public class BasicClazz extends ObjectType implements Definition
Modifier and Type | Field and Description |
---|---|
protected List<Annotation> |
annotations |
protected Configuration |
configuration |
protected EnumSet<Modifier> |
declaredModifiers |
protected HelperTypes |
helperTypes |
private boolean |
initializedContent |
protected List<Member> |
members |
protected List<Method> |
methods |
protected String |
packageName |
baseClazzType, genericTypeArguments, initializedType, interfaceTypes, superTypesWithAscendants
clazzUsingType, qualifiedProtoTypicalTypeName
MAX_RECURSIVE_LEVEL, NO_DETAILS_LEVEL
Modifier | Constructor and Description |
---|---|
|
BasicClazz(BasicClazz optClazzUsingType,
Configuration configuration,
String qualifiedProtoTypicalTypeName,
Function<BasicClazz,HelperTypes> helperFactoryMethod) |
private |
BasicClazz(BasicClazz optClazzUsingType,
Configuration configuration,
String qualifiedProtoTypicalTypeName,
Function<BasicClazz,HelperTypes> helperFactoryMethod,
List<Member> members,
List<Method> methods,
EnumSet<Modifier> declaredModifiers,
List<Annotation> annotations) |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeMoreDetailed() |
Type |
copy(BasicClazz clazzUsingType) |
boolean |
equals(Object obj) |
List<Annotation> |
getAnnotations()
Get annotations associated with this definition.
|
Configuration |
getConfiguration()
The configuration object for this model.
|
EnumSet<Modifier> |
getDeclaredModifiers()
Get modifiers as orginally declared in inteface or base class (or none if new method).
|
DetailLevel |
getDetailLevel() |
String |
getGenericQualifierText() |
HelperTypes |
getHelperTypes() |
List<Member> |
getMembers() |
List<Member> |
getMembersIncludingInherited() |
List<Method> |
getMethods() |
EnumSet<Modifier> |
getModifiers()
Get modifiers as they should be used generated code when defining something.
|
String |
getPackageName()
Returns type package name of the type.
|
boolean |
hasFactoryMethods() |
boolean |
hasGenericQualifier() |
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.
|
void |
initContent(List<Member> members,
List<Method> methods,
EnumSet<Modifier> declaredModifiers,
List<Annotation> annotations)
Nb.
|
boolean |
initialized() |
boolean |
isMutable() |
boolean |
isThisSuperType()
Returns if the type is the base class for the generated type (Clazz)
|
void |
print(IndentedPrintWriter writer,
int detailLevel)
Helper method for printing out the model nicely without getting into problems with its circular references.
|
Member |
tryGetMember(String name) |
Member |
tryGetMemberIncludingInherited(String name) |
Method |
tryGetMethod(String name) |
getBaseClazzType, getConstructors, getGenericTypeArguments, getInterfaceTypes, getPrototypicalName, getSuperTypesWithAscendants, getTypeCategory, hasAnyMembers, hasArrayMembers, hasCollectionMembers, hasPrimitiveMembers, initType, isInImportScope, isObject, isOfQualifiedType, isRootObject
getClazz, getName, getPrototypicalQualifiedName, getQualifiedName, getSimpleName, getWrapperName, isArray, isCollection, isExactQualifiedType, isExactType, isExactType, isMultiDimensionalArray, isOfType, isOfType, isPrimitive, isPrimitiveBoolean, isPrimitiveByte, isPrimitiveChar, isPrimitiveDouble, isPrimitiveFloat, isPrimitiveInt, isPrimitiveLong, isPrimitiveShort, isThisType, isVoid
printExtraBottom, printExtraTop, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getName, isAbstract, isFinal, isPrivate, isProtected, isPublic, isStatic, isTransient
getClazz, getGeneratedClazz, getVariablesPrefix, isInDefaultPackage
protected final Configuration configuration
protected final String packageName
protected final HelperTypes helperTypes
protected List<Annotation> annotations
private boolean initializedContent
public BasicClazz(BasicClazz optClazzUsingType, Configuration configuration, String qualifiedProtoTypicalTypeName, Function<BasicClazz,HelperTypes> helperFactoryMethod)
private BasicClazz(BasicClazz optClazzUsingType, Configuration configuration, String qualifiedProtoTypicalTypeName, Function<BasicClazz,HelperTypes> helperFactoryMethod, List<Member> members, List<Method> methods, EnumSet<Modifier> declaredModifiers, List<Annotation> annotations)
public Type copy(BasicClazz clazzUsingType)
copy
in class ObjectType
public boolean initialized()
initialized
in class ObjectType
public void initContent(List<Member> members, List<Method> methods, EnumSet<Modifier> declaredModifiers, List<Annotation> annotations)
ObjectType.initType(com.fortyoneconcepts.valjogen.model.ObjectType, java.util.List<com.fortyoneconcepts.valjogen.model.Type>, java.util.Set<com.fortyoneconcepts.valjogen.model.Type>, java.util.List<com.fortyoneconcepts.valjogen.model.Type>)
methods must be called for the class to be fully initialized and ready for use. Must be called only once.members
- Member variables for class.methods
- Other methods for class.declaredModifiers
- declared clazz modifiers (empty if a new Clazz)annotations
- Annotations for the clazz.public Configuration getConfiguration()
Model
getConfiguration
in interface Model
getConfiguration
in class Type
public String getPackageName()
Type
getPackageName
in interface Model
getPackageName
in class Type
public HelperTypes getHelperTypes()
public EnumSet<Modifier> getDeclaredModifiers()
Definition
getDeclaredModifiers
in interface Definition
public EnumSet<Modifier> getModifiers()
Definition
getModifiers
in interface Definition
public List<Annotation> getAnnotations()
Definition
getAnnotations
in interface Definition
public DetailLevel getDetailLevel()
getDetailLevel
in class Type
public boolean isThisSuperType()
Type
isThisSuperType
in class Type
public boolean canBeMoreDetailed()
canBeMoreDetailed
in class ObjectType
public boolean hasGenericQualifier()
public String getGenericQualifierText()
public boolean isMutable()
public List<Member> getMembers()
getMembers
in class ObjectType
public List<Method> getMethods()
getMethods
in class ObjectType
public boolean hasFactoryMethods()
public boolean hasStaticMethod(String overloadName)
Type
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.hasStaticMethod
in class Type
overloadName
- overload name of form <methodName> "(" <unqualifed parameter type name> { "," <unqualifed parameter type name> } ")"
public boolean hasInstanceMethod(String overloadName)
Type
STCustomModelAdaptor
recoginze this method under the magic name instanceMethod_xxx.hasInstanceMethod
in class Type
overloadName
- overload name of form <methodName> "(" <unqualifed parameter type name> { "," <unqualifed parameter type name> } ")"
public boolean hasStaticMember(String name)
Type
STCustomModelAdaptor
recoginze this method under the magic name staticMember_xxx.hasStaticMember
in class Type
name
- name of field.public boolean hasInstanceMember(String name)
Type
STCustomModelAdaptor
recoginze this method under the magic name instanceMember_xxx.hasInstanceMember
in class Type
name
- name of field.public void print(IndentedPrintWriter writer, int detailLevel)
Model
print
in interface Model
print
in class ObjectType
writer
- The writer to print todetailLevel
- The curren recursion level. Call with 0 initially.
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.