Class TypeWrapper<T>

java.lang.Object
org.evrete.api.TypeWrapper<T>
All Implemented Interfaces:
Copyable<Type<T>>, Named, Type<T>

public class TypeWrapper<T>
extends Object
implements Type<T>
  • Constructor Details

    • TypeWrapper

      public TypeWrapper​(Type<T> delegate)
  • Method Details

    • getDelegate

      public final Type<T> getDelegate()
    • getJavaType

      public final Class<T> getJavaType()
      Specified by:
      getJavaType in interface Type<T>
    • getName

      public final String getName()
      Specified by:
      getName in interface Named
    • getDeclaredFields

      public Collection<TypeField> getDeclaredFields()
      Specified by:
      getDeclaredFields in interface Type<T>
    • getField

      public TypeField getField​(String name)
      Description copied from interface: Type

      Returns a declared field with the given name, or null if no such field is found.

      Specified by:
      getField in interface Type<T>
      Parameters:
      name - field name
      Returns:
      a declared field or null
    • declareField

      public TypeField declareField​(String name, Class<?> type, Function<T,​Object> function)
      Description copied from interface: Type

      Field declaration with a Function as value reader.

      Specified by:
      declareField in interface Type<T>
      Parameters:
      name - field name
      type - field value type
      function - the function that will be used to read field's value
      Returns:
      newly created field
    • copyOf

      public Type<T> copyOf()
      Specified by:
      copyOf in interface Copyable<T>
    • equals

      public final boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object