public abstract class Type extends ModelBase
Modifier and Type | Field and Description |
---|---|
protected BasicClazz |
clazzUsingType |
protected String |
qualifiedProtoTypicalTypeName |
MAX_RECURSIVE_LEVEL, NO_DETAILS_LEVEL
Modifier | Constructor and Description |
---|---|
protected |
Type(BasicClazz optClazzUsingType,
String qualifiedProtoTypicalTypeName) |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeMoreDetailed() |
abstract Type |
copy(BasicClazz optClazzUsingType) |
boolean |
equals(Object obj) |
BasicClazz |
getClazz()
Get the (basic) class that this model is used in.
|
Configuration |
getConfiguration()
The configuration object for this model.
|
DetailLevel |
getDetailLevel() |
String |
getName()
Returns a simple type name without package unless nedded and without any generic parts.
|
String |
getPackageName()
Returns type package name of the type.
|
String |
getPrototypicalName()
Returns a simple type name without package unless nedded.
|
String |
getPrototypicalQualifiedName()
Returns a full type name with package in front.
|
String |
getQualifiedName()
Returns a type name with package but without any generic parts.
|
private String |
getReflectionOverloadName(Method m,
boolean includeMethodName) |
private Stream<Class<?>> |
getReflectionSuperTypesWithAscendants(Class<?> clazz) |
String |
getSimpleName()
Returns a simple type name without package and without any generic parts.
|
abstract TypeCategory |
getTypeCategory()
Returns this overall category (kind) of type this type is.
|
String |
getWrapperName()
Return the name of the type when represented as an object.
|
int |
hashCode() |
boolean |
hasInstanceMember(String name)
Returns if type has a non-private instance member field with the specified name.
|
boolean |
hasInstanceMethod(String overloadName)
Returns if type has a non-private instance method with the specified overload name.
|
boolean |
hasStaticMember(String name)
Returns if type has a static non-private field with the specified name.
|
boolean |
hasStaticMethod(String overloadName)
Returns if type has a static non-private method with the specified overload name.
|
boolean |
isArray() |
boolean |
isCollection() |
boolean |
isExactQualifiedType(String qualifiedClassOrInterfaceName)
Returns if type exactly matche specified qualified class/interface.
|
boolean |
isExactType(Class<?> _class)
Returns if type exactly matches specified class/interfac
|
boolean |
isExactType(String classOrInterfaceName)
Returns if type exactly matches specified class/interface.
|
abstract boolean |
isInImportScope()
Checks if the type is in scope of the class being generated taking imports and default packages etc.
|
boolean |
isMultiDimensionalArray() |
boolean |
isObject() |
boolean |
isOfQualifiedType(String qualifiedClassOrInterfaceName)
Returns if type is equal to or implements/inherites from specified qualified class/interface.
|
boolean |
isOfType(Class<?> _class)
Returns if type is equal to or implements/inherites from specified qualified class/interface.
|
boolean |
isOfType(String classOrInterfaceName)
Returns if type is equal to or implements/inherites from specified class/interface.
|
boolean |
isPrimitive() |
boolean |
isPrimitiveBoolean() |
boolean |
isPrimitiveByte() |
boolean |
isPrimitiveChar() |
boolean |
isPrimitiveDouble() |
boolean |
isPrimitiveFloat() |
boolean |
isPrimitiveInt() |
boolean |
isPrimitiveLong() |
boolean |
isPrimitiveShort() |
boolean |
isRootObject()
Checks if the type is java.lang.Object
|
boolean |
isThisSuperType()
Returns if the type is the base class for the generated type (Clazz)
|
boolean |
isThisType()
Returns if the type is a generated type (Clazz)
|
boolean |
isVoid() |
private Class<?> |
tryGetReflectionClass()
Only supported for existing classes on classpath.
|
print, printExtraBottom, printExtraTop, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getGeneratedClazz, getVariablesPrefix, isInDefaultPackage
protected BasicClazz clazzUsingType
protected final String qualifiedProtoTypicalTypeName
protected Type(BasicClazz optClazzUsingType, String qualifiedProtoTypicalTypeName)
public abstract Type copy(BasicClazz optClazzUsingType)
public Configuration getConfiguration()
Model
public BasicClazz getClazz()
Model
public String getPackageName()
public String getQualifiedName()
public String getPrototypicalQualifiedName()
public abstract boolean isInImportScope()
public String getName()
public String getSimpleName()
public String getPrototypicalName()
public String getWrapperName()
public boolean isRootObject()
public boolean isPrimitive()
public boolean isVoid()
public boolean isPrimitiveByte()
public boolean isPrimitiveBoolean()
public boolean isPrimitiveChar()
public boolean isPrimitiveShort()
public boolean isPrimitiveInt()
public boolean isPrimitiveLong()
public boolean isPrimitiveFloat()
public boolean isPrimitiveDouble()
public boolean isArray()
public boolean isObject()
public boolean isMultiDimensionalArray()
public DetailLevel getDetailLevel()
public boolean canBeMoreDetailed()
public boolean isCollection()
public boolean isThisType()
public boolean isThisSuperType()
public abstract TypeCategory getTypeCategory()
public final boolean isExactType(String classOrInterfaceName)
STCustomModelAdaptor
recognize this method under the magic name exactType_xxx.classOrInterfaceName
- The name (qualified or unqualified) of the class/interface.public final boolean isExactType(Class<?> _class)
_class
- The class/interface.public final boolean isExactQualifiedType(String qualifiedClassOrInterfaceName)
qualifiedClassOrInterfaceName
- The qualified name of the class/interface.public final boolean isOfType(String classOrInterfaceName)
STCustomModelAdaptor
recoginze this method under the magic name ofType_xxx.classOrInterfaceName
- The name (qualified or unqualified) of the class/interface.public final boolean isOfType(Class<?> _class)
_class
- The qualified class/interface.public boolean isOfQualifiedType(String qualifiedClassOrInterfaceName)
qualifiedClassOrInterfaceName
- The qualified name of the class/interface.public boolean hasStaticMethod(String overloadName)
STCustomModelAdaptor
recoginze this method under the magic name staticMethod_xxx.
Note that because of type erasure the type of argument may be a plain Object when using reflection for lookup as used in default implementation
When this method is overidden erasure is not used so this should not be an issue for overriding subclasses.overloadName
- overload name of form <methodName> "(" <unqualifed parameter type name> { "," <unqualifed parameter type name> } ")"
public boolean hasInstanceMethod(String overloadName)
STCustomModelAdaptor
recoginze this method under the magic name instanceMethod_xxx.overloadName
- overload name of form <methodName> "(" <unqualifed parameter type name> { "," <unqualifed parameter type name> } ")"
public boolean hasStaticMember(String name)
STCustomModelAdaptor
recoginze this method under the magic name staticMember_xxx.name
- name of field.public boolean hasInstanceMember(String name)
STCustomModelAdaptor
recoginze this method under the magic name instanceMember_xxx.name
- name of field.private final Stream<Class<?>> getReflectionSuperTypesWithAscendants(Class<?> clazz)
private final Class<?> tryGetReflectionClass()
private final String getReflectionOverloadName(Method m, boolean includeMethodName)
Version 2.0.0 generated on 2014-11-22 at 09:45 - (C) 41concepts Aps. Refer to project homepage valjogen.41concepts.com for more information.