package com.example.demo.classloader.reflection;

public class XValue {
    private final Object value;

    XValue(Object value) {
        this.value = value;
    }

    public XField field(String name) throws NoSuchFieldException {
        return XReflection.field(value.getClass(), name);
    }

    public XMethod method(String name, Class<?>... parameterTypes) throws NoSuchMethodException {
        return XReflection.method(value.getClass(), name, parameterTypes);
    }

    public <T> T value() {
        return (T) value;
    }

}
