All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jtwig.reflection.model.Value Maven / Gradle / Ivy

There is a newer version: 5.87.0.RELEASE
Show newest version
package org.jtwig.reflection.model;

import org.jtwig.reflection.model.java.JavaClass;

import static org.jtwig.reflection.model.java.JavaClassManager.classManager;


public class Value {
    private final Object value;

    public Value(Object value) {
        this.value = value;
    }

    public Object getValue() {
        return value;
    }

    public  T as (Class type) {
        return type.cast(value);
    }

    public JavaClass type () {
        if (value == null) return null;
        return classManager().metadata(value.getClass());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy