public class ClassRef extends TypeRef implements Nameable, Mappable<ClassRef>
| Modifier and Type | Field and Description |
|---|---|
static String |
BRACKETS |
static ClassRef |
OBJECT |
static String |
UNKNOWN |
IN_PACKAGE, IS_UPPER_CASE, OUT_OF_PACKAGE, PACKAGE_SEPARATOR_REGEXAT, CB, CC, CLP, COMA, CP, DOT, DQ, EQ, EXTENDS, GT, IMPLEMENTS, JAVA_LANG, JAVA_LANG_ENUM, JAVA_LANG_OBJECT, JAVA_LANG_STRING, LT, NEWLINE, OB, OC, OP, Q, SEMICOLN, SPACE, STAR, THROWS, VARARGALSO_IMPORT, DEFAULT_VALUE, INIT, INIT_FUNCTION, LAZY_INIT| Constructor and Description |
|---|
ClassRef(String fullyQualifiedName,
int dimensions,
List<TypeRef> arguments,
Map<AttributeKey,Object> attributes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static ClassRef |
forName(String fullyQualifiedName) |
List<TypeRef> |
getArguments() |
int |
getDimensions() |
String |
getFullyQualifiedName()
Get the fully qualified name of the type.
|
String |
getName()
Get the name.
|
Set<ClassRef> |
getReferences() |
int |
hashCode() |
String |
render(TypeDef enclosingType)
Render the type into a
String for the purpose of code generation. |
String |
toString() |
ClassRef |
withDimensions(int dimensions) |
getAttribute, getAttributes, hasAttributeclone, finalize, getClass, notify, notifyAll, wait, wait, waitafter, getClassName, getOuterTypeName, getPackageName, getPackageName, untilrenderpublic static final String UNKNOWN
public static final String BRACKETS
public static final ClassRef OBJECT
public String getFullyQualifiedName()
NameablegetFullyQualifiedName in interface Nameablepublic int getDimensions()
getDimensions in class TypeRefpublic ClassRef withDimensions(int dimensions)
withDimensions in class TypeRefpublic String render(TypeDef enclosingType)
RenderableString for the purpose of code generation.
This is slightly different from the `toString()` method as `toString()` is mostly needed for logging / debugging.
In contrast with its no-arg equivallent this method is idempotent.render in interface RenderableenclosingType - The type that encoses the current Renderable.String representation of the object as it's meant to appear in the generated code.Copyright © 2023. All rights reserved.