public class Property extends ModifierSupport implements Renderable, Commentable, Annotatable
ABSTRACT, FINAL, modifiers, PRIVATE, PROTECTED, PUBLIC, STATIC, SYNCHRONIZEDAT, 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 |
|---|
Property(List<AnnotationRef> annotations,
TypeRef typeRef,
String name,
List<String> comments,
boolean enumConstant,
boolean synthetic,
Modifiers modifiers,
Map<AttributeKey,Object> attributes) |
Property(List<AnnotationRef> annotations,
TypeRef typeRef,
String name,
List<String> comments,
Modifiers modifiers,
Map<AttributeKey,Object> attributes)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<AnnotationRef> |
getAnnotations() |
List<String> |
getComments()
Get the list of comments.
|
protected String |
getDefaultValue() |
String |
getName() |
String |
getNameCapitalized() |
Set<ClassRef> |
getReferences() |
TypeRef |
getTypeRef() |
int |
hashCode() |
boolean |
isEnumConstant() |
boolean |
isSynthetic() |
static Property |
newProperty(TypeRef typeRef,
String name) |
String |
render(TypeDef enclosingType)
Render the type into a
String for the purpose of code generation. |
String |
toString() |
Property |
withErasure()
Get the property after the type erasure is applied.
|
protected Property |
withoutModiers()
This is only used for rendering method arguments, where we usually string modifiers.
|
getModifiers, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isTransient, renderModifiers, renderModifiersgetAttribute, getAttributes, hasAttributeclone, finalize, getClass, notify, notifyAll, wait, wait, waitrenderrenderCommentsrenderAnnotationspublic Property(List<AnnotationRef> annotations, TypeRef typeRef, String name, List<String> comments, boolean enumConstant, boolean synthetic, Modifiers modifiers, Map<AttributeKey,Object> attributes)
@Deprecated public Property(List<AnnotationRef> annotations, TypeRef typeRef, String name, List<String> comments, Modifiers modifiers, Map<AttributeKey,Object> attributes)
public List<AnnotationRef> getAnnotations()
getAnnotations in interface Annotatablepublic TypeRef getTypeRef()
public String getName()
public List<String> getComments()
CommentablegetComments in interface CommentableList of comments.public boolean isEnumConstant()
public boolean isSynthetic()
public String getNameCapitalized()
protected Property withoutModiers()
public Property withErasure()
protected String getDefaultValue()
public 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.