Class TypeResolverWrapper

java.lang.Object
org.evrete.util.TypeResolverWrapper
All Implemented Interfaces:
Copyable<TypeResolver>, TypeResolver

@Deprecated public class TypeResolverWrapper extends Object implements TypeResolver
Deprecated.
This class is deprecated and will be removed in future releases. Use the RuntimeContext.configureTypes(Consumer) method instead to configure the context's types and their fields.
TypeResolverWrapper is a wrapper class for TypeResolver. It delegates method calls to the underlying TypeResolver instance. Developers can utilize this class to customize or modify the behavior of the resolver.
  • Constructor Details

    • TypeResolverWrapper

      public TypeResolverWrapper(TypeResolver delegate)
      Deprecated.
  • Method Details

    • getType

      public <T> Type<T> getType(int typeId)
      Deprecated.
      Specified by:
      getType in interface TypeResolver
      Type Parameters:
      T - type parameter
      Parameters:
      typeId - type id
      Returns:
      existing Type
    • wrapType

      public void wrapType(TypeWrapper<?> typeWrapper)
      Deprecated.
      Description copied from interface: TypeResolver
      Wraps a given TypeWrapper instance and delegates the calls to another Type implementation.
      Specified by:
      wrapType in interface TypeResolver
      Parameters:
      typeWrapper - the TypeWrapper instance to be wrapped
    • getType

      public <T> Type<T> getType(String name)
      Deprecated.
      Specified by:
      getType in interface TypeResolver
      Type Parameters:
      T - type parameter
      Parameters:
      name - type's declared name
      Returns:
      existing Type or null if not found
    • resolve

      public <T> Type<T> resolve(Object o)
      Deprecated.
      Specified by:
      resolve in interface TypeResolver
      Type Parameters:
      T - type parameter
      Parameters:
      o - object to resolve
      Returns:
      Type of the argument or null if object's type is unknown
    • getKnownTypes

      public Collection<Type<?>> getKnownTypes()
      Deprecated.
      Description copied from interface: TypeResolver
      Returns a collection of all known types.
      Specified by:
      getKnownTypes in interface TypeResolver
      Returns:
      a collection of Type instances representing the known types
    • declare

      public <T> Type<T> declare(String typeName, String javaType)
      Deprecated.
      Description copied from interface: TypeResolver

      Declares and registers new Type with the given logical type name and Java class name. The existence of the corresponding Java class will be checked lazily, when the engine requires access to the class's properties.

      Specified by:
      declare in interface TypeResolver
      Type Parameters:
      T - java class type parameter
      Parameters:
      typeName - logical type name
      javaType - Java class name
      Returns:
      new logical type
    • copyOf

      public TypeResolver copyOf()
      Deprecated.
      Specified by:
      copyOf in interface Copyable<TypeResolver>
    • declare

      public <T> Type<T> declare(String typeName, Class<T> javaType)
      Deprecated.
      Description copied from interface: TypeResolver

      Declares and registers new Type with the given type name and Java class

      Specified by:
      declare in interface TypeResolver
      Type Parameters:
      T - java class type parameter
      Parameters:
      typeName - logical type name
      javaType - Java class
      Returns:
      new internal type