public class EPTypeClass extends 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 Class<?> |
typeClass |
Constructor and Description |
---|
EPTypeClass(Class<?> typeClass)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
appendFullName(StringWriter writer)
Appends the class full name.
|
void |
appendSimpleName(StringWriter writer)
Appends the class simple name.
|
boolean |
equals(Object o) |
Class<?> |
getType()
Returns the type.
|
String |
getTypeName()
Returns the type name.
|
int |
hashCode() |
String |
toFullName()
Returns the class full name, including type parameters if any.
|
String |
toSimpleName()
Returns the class simple name, including type parameters if any.
|
String |
toString() |
void |
traverseClasses(Consumer<Class<?>> classConsumer)
Traverses classes that are referenced by the class and type parameters, if any.
|
public static final EPTypeClass EPTYPE
protected final Class<?> typeClass
public EPTypeClass(Class<?> typeClass)
typeClass
- clazzpublic Class<?> getType()
public void traverseClasses(Consumer<Class<?>> classConsumer)
classConsumer
- consumerpublic void appendFullName(StringWriter writer)
writer
- to append topublic void appendSimpleName(StringWriter writer)
writer
- to append topublic String toFullName()
public String toSimpleName()
public String getTypeName()
EPType
getTypeName
in interface EPType
Copyright © 2005–2022. All rights reserved.