public abstract class TypeNode extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getAsFunctionParameter()
Returns the parameterName if set or the fieldName and appends an '?'
|
String |
getAsVariableName()
Returns the parameterName if set or the fieldName and does not append an '?'
|
abstract List<TypeNode> |
getChildren() |
Set<EnumValue> |
getEnumValues() |
abstract String |
getFieldName()
Declared name of this Type as Methodparameter or Variable.
|
abstract Set<TypeNode> |
getImports() |
abstract TypeNodeKind |
getKind()
TypeNodeKind of this TypeNode. |
abstract String |
getParameterName()
Declared name or value in
RequestParam or
PathVariable Annotation of this Type. |
abstract String |
getTemplate()
Classpath to the Freemarker Template which is used to generate this TypeNode.
|
abstract String |
getType()
Returns the template-usable String representing this
TypeNode with added decorations like '[]' as suffix for collections or
bound Generics. |
abstract String |
getTypeName()
This is the raw name of this TypeNode without any decorations for collections or maps or bound Generics.
|
String |
getTypeNameVariable() |
abstract List<TypeNode> |
getTypeParameters()
Typeparameters are bound Generics as in
GenericType<BoundType>. |
abstract Set<TypeNode> |
getTypes() |
String |
getVariableType() |
int |
hashCode() |
boolean |
isDeclaredComplexType() |
boolean |
isMappedType()
Returns true if this TypeNode is a mapped Type.
|
boolean |
isOptional()
Returns wether this TypeNode is an optional Parameter or not.
|
public abstract TypeNodeKind getKind()
TypeNodeKind of this TypeNode.TypeNodeKindpublic abstract String getFieldName()
private String someFieldName; results in "someFieldName" as fieldName or
public void execute(String anotherFieldName) {...} in "anotherFieldName".public abstract String getParameterName()
RequestParam or
PathVariable Annotation of this Type.public void delete(@PathVariable(name = "pathVariable") Long id, @RequestParam(name = "queryParam") String queryParameter){...}id and "queryParam" for queryParameter.public String getAsFunctionParameter()
isOptional() == true.
Templates can use this to declare Method-Parameters or use getAsVariableName() and declare optional Parameters them self.public String getAsVariableName()
isOptional() == true.
Templates should use this as Variable-Name if used not as Function-Parameter.public abstract String getTypeName()
getType() in your templates.
For example:Map<String, Number> -> 'Map'List<GenericType<Innertype>> -> 'List'getType()public String getTypeNameVariable()
public abstract String getType()
TypeNode with added decorations like '[]' as suffix for collections or
bound Generics.Map<String, Number> -> '{ [index: string]: number }'List<GenericType<Innertype>> -> 'GenericType<InnerType>[]'getTypeName()public String getVariableType()
public abstract String getTemplate()
public abstract List<TypeNode> getTypeParameters()
GenericType<BoundType>.
For example Type<TypeOne, TypeTwo> results in a List with the two Entries with TypeNodes for 'TypeOne' and 'TypeTwo'.public boolean isMappedType()
true if mapped
false otherwisepublic boolean isDeclaredComplexType()
public boolean isOptional()
Optional or is declared as not required in the respective AnnotationCopyright © 2016–2018. All rights reserved.