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(java.util.List<AnnotationRef> annotations,
TypeRef typeRef,
java.lang.String name,
java.util.List<java.lang.String> comments,
int modifiers,
java.util.Map<AttributeKey,java.lang.Object> attributes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<AnnotationRef> |
getAnnotations() |
java.util.List<java.lang.String> |
getComments()
Get the list of comments.
|
protected java.lang.String |
getDefaultValue() |
java.lang.String |
getName() |
java.lang.String |
getNameCapitalized() |
java.util.Set<ClassRef> |
getReferences() |
TypeRef |
getTypeRef() |
int |
hashCode() |
java.lang.String |
render(TypeDef enclosingType)
Render the type into a
String for the purpose of code generation. |
java.lang.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, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isTransient, renderModifiers, renderModifiersgetAttribute, getAttributes, hasAttributeclone, finalize, getClass, notify, notifyAll, wait, wait, waitrenderrenderCommentsrenderAnnotationspublic Property(java.util.List<AnnotationRef> annotations, TypeRef typeRef, java.lang.String name, java.util.List<java.lang.String> comments, int modifiers, java.util.Map<AttributeKey,java.lang.Object> attributes)
public java.util.List<AnnotationRef> getAnnotations()
getAnnotations in interface Annotatablepublic TypeRef getTypeRef()
public java.lang.String getName()
public java.util.List<java.lang.String> getComments()
CommentablegetComments in interface CommentableList of comments.public java.lang.String getNameCapitalized()
public java.util.Set<ClassRef> getReferences()
protected Property withoutModiers()
public Property withErasure()
protected java.lang.String getDefaultValue()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.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.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2022. All Rights Reserved.