public class EPTypeClass extends java.lang.Object implements EPType
EPTypeClass
represents the value class and does not have type parameters. Use EPTypeClassParameterized
for a class with type parameters.
Use EPTypePremade.getOrCreate(Class)
to obtain an EPTypeClass
instance for many commonly-used types.
You may also use EPTypePremade.STRING
(for example for the string type).
The EPL compiler and runtime do not only use Class
as Java type erasure means that a class instance
does not provide information about its type parameters. For instance the type List<String>
has String
as the type parameter. Looking at List.class
alone
does not provide such type information.
Modifier and Type | Field and Description |
---|---|
static EPTypeClass |
EPTYPE
Type information
|
protected java.lang.Class<?> |
typeClass |
Constructor and Description |
---|
EPTypeClass(java.lang.Class<?> typeClass)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
appendFullName(java.io.StringWriter writer)
Appends the class full name.
|
void |
appendSimpleName(java.io.StringWriter writer)
Appends the class simple name.
|
boolean |
equals(java.lang.Object o) |
java.lang.Class<?> |
getType()
Returns the type.
|
java.lang.String |
getTypeName()
Returns the type name.
|
int |
hashCode() |
java.lang.String |
toFullName()
Returns the class full name, including type parameters if any.
|
java.lang.String |
toSimpleName()
Returns the class simple name, including type parameters if any.
|
java.lang.String |
toString() |
void |
traverseClasses(java.util.function.Consumer<java.lang.Class<?>> classConsumer)
Traverses classes that are referenced by the class and type parameters, if any.
|
public static final EPTypeClass EPTYPE
protected final java.lang.Class<?> typeClass
public EPTypeClass(java.lang.Class<?> typeClass)
typeClass
- clazzpublic java.lang.Class<?> getType()
public java.lang.String toString()
toString
in class java.lang.Object
public void traverseClasses(java.util.function.Consumer<java.lang.Class<?>> classConsumer)
classConsumer
- consumerpublic void appendFullName(java.io.StringWriter writer)
writer
- to append topublic void appendSimpleName(java.io.StringWriter writer)
writer
- to append topublic java.lang.String toFullName()
public java.lang.String toSimpleName()
public java.lang.String getTypeName()
EPType
getTypeName
in interface EPType
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object