Package io.sundr.model
Class Variable<T extends TypeRef>
java.lang.Object
io.sundr.model.AttributeSupport
io.sundr.model.ModifierSupport
io.sundr.model.Variable<T>
- All Implemented Interfaces:
Annotatable,Attributeable,Commentable,Expression,Node,Renderable,WithName,WithReferences
- Direct Known Subclasses:
Argument,Field,LocalVariable
public abstract class Variable<T extends TypeRef>
extends ModifierSupport
implements WithName, Expression, Commentable, Annotatable
-
Field Summary
Fields inherited from class io.sundr.model.ModifierSupport
ABSTRACT, FINAL, modifiers, PRIVATE, PROTECTED, PUBLIC, STATIC, SYNCHRONIZEDFields inherited from interface io.sundr.model.Attributeable
ALSO_IMPORT, DEFAULT_VALUE, INIT, INIT_FUNCTION, LAZY_INITFields inherited from interface io.sundr.model.Expression
NULLFields inherited from interface io.sundr.model.Node
AT, CB, CC, CLP, COLN, COMA, CP, DOT, DQ, EMPTY, EQ, EXTENDS, GT, IMPLEMENTS, INDENT, JAVA_LANG, JAVA_LANG_ENUM, JAVA_LANG_OBJECT, JAVA_LANG_STRING, LT, NEWLINE, NEWLINE_PATTERN, OB, OC, OP, Q, SEMICOLN, SEMICOLN_SUFFIX_PATTERN, SPACE, STAR, THROWS, VARARG -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVariable(Modifiers modifiers, Map<AttributeKey, Object> attributes, List<String> comments, List<AnnotationRef> annotations, T typeRef, String name, Optional<Expression> initialValue, boolean enumConstant, boolean synthetic) -
Method Summary
Methods inherited from class io.sundr.model.ModifierSupport
getModifiers, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isTransient, renderModifiers, renderModifiersMethods inherited from class io.sundr.model.AttributeSupport
getAttribute, getAttributes, hasAttributeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.sundr.model.Annotatable
renderAnnotationsMethods inherited from interface io.sundr.model.Commentable
renderCommentsMethods inherited from interface io.sundr.model.Expression
and, and, assign, assign, assignNew, assignNew, assignNull, call, call, cast, cast, divide, enclosed, eq, index, index, instanceOf, instanceOf, isNull, minus, minus, modulo, multiply, ne, negative, not, notNull, or, or, plus, plus, positive, postDecrement, postIncrement, preIncrement, pretDecrement, property, property, property, retMethods inherited from interface io.sundr.model.Renderable
render, tab
-
Constructor Details
-
Variable
protected Variable(Modifiers modifiers, Map<AttributeKey, Object> attributes, List<String> comments, List<AnnotationRef> annotations, T typeRef, String name, Optional<Expression> initialValue, boolean enumConstant, boolean synthetic)
-
-
Method Details
-
getComments
Description copied from interface:CommentableGet the list of comments.- Specified by:
getCommentsin interfaceCommentable- Returns:
- a
Listof comments.
-
getAnnotations
- Specified by:
getAnnotationsin interfaceAnnotatable
-
getTypeRef
-
getName
-
getInitialValue
-
isEnumConstant
public boolean isEnumConstant() -
isSynthetic
public boolean isSynthetic() -
getNameCapitalized
-
getReferences
- Specified by:
getReferencesin interfaceWithReferences
-
equals
-
renderExpression
- Specified by:
renderExpressionin interfaceExpression
-
hashCode
public int hashCode() -
asField
-
asArgument
-
asLocalVariable
-
toString
-