- Type Parameters:
T- The Java type associated with this type.
Type interface and delegates the calls to another Type implementation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyOf()<V> TypeFielddeclareField(String name, Class<V> type, Function<T, V> function) Field declaration with aFunctionas value reader.final booleanReturns a declared field with the given name.There can be only one Type with the given name, but there could be many types associated with a specific Java Class.final StringDeprecated.final StringgetName()Returns logical name of the typefinal inthashCode()Deprecated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.evrete.api.Type
declareBooleanField, declareDoubleField, declareIntField, declareLongField
-
Constructor Details
-
TypeWrapper
-
-
Method Details
-
getDelegate
-
getJavaType
Deprecated.Description copied from interface:TypeThere can be only one Type with the given name, but there could be many types associated with a specific Java Class. This method returns the associated Java type.
- Specified by:
getJavaTypein interfaceType<T>- Returns:
- name of the Java Class associated with the type.
-
resolveJavaType
Deprecated.- Specified by:
resolveJavaTypein interfaceType<T>- Returns:
- the resolved Java Class associated with the type.
-
getName
Description copied from interface:TypeReturns logical name of the type -
getField
Description copied from interface:TypeReturns a declared field with the given name. If no such field was explicitly declared, an attempt will be made to resolve the respective field/getter of the declared Java class. If no such field or getter is found, the method will throw
IllegalArgumentExceptionEmpty field name has a special meaning of the
"this"value, i.e. such field's values represent the type's instances themself. -
getJavaClass
Description copied from interface:TypeThere can be only one Type with the given name, but there could be many types associated with a specific Java Class. This method returns the associated Java type.
- Specified by:
getJavaClassin interfaceType<T>- Returns:
- the Java Class associated with the type.
-
declareField
Description copied from interface:TypeField declaration with a
Functionas value reader.- Specified by:
declareFieldin interfaceType<T>- Type Parameters:
V- field value generic type- Parameters:
name- field nametype- field value classfunction- the function that will be used to read field's value- Returns:
- a newly created field or an existing one if already declared/resolved
-
copyOf
-
equals
-
hashCode
public final int hashCode()
-