class SuccessorJVarDeclaration extends java.lang.Object implements JVarDeclaration
Modifier and Type | Field and Description |
---|---|
private FirstJVarDeclaration |
first |
private java.lang.String |
name |
private JExpr |
value |
Constructor and Description |
---|
SuccessorJVarDeclaration(FirstJVarDeclaration first,
java.lang.String name,
JExpr value) |
Modifier and Type | Method and Description |
---|---|
JVarDeclaration |
add(java.lang.String name)
Add another item to this declaration.
|
JVarDeclaration |
add(java.lang.String name,
JExpr init)
Add another item to this declaration.
|
JAnnotation |
annotate(java.lang.Class<? extends java.lang.annotation.Annotation> type)
Add an annotation.
|
JAnnotation |
annotate(JType type)
Add an annotation.
|
JAnnotation |
annotate(java.lang.String type)
Add an annotation.
|
JComment |
blockComment()
Add a block comment.
|
JComment |
deprecated()
Mark this program element as deprecated.
|
JDocComment |
docComment()
Get or create the doc comment for this element.
|
(package private) JExpr |
getValue() |
JComment |
lineComment()
Add a line comment.
|
java.lang.String |
name()
Get the variable name.
|
JType |
type()
Get the variable type.
|
private final FirstJVarDeclaration first
private final java.lang.String name
private final JExpr value
SuccessorJVarDeclaration(FirstJVarDeclaration first, java.lang.String name, JExpr value)
public java.lang.String name()
JVarDeclaration
name
in interface JVarDeclaration
JExpr getValue()
public JComment blockComment()
JCommentable
blockComment
in interface JCommentable
public JComment lineComment()
JCommentable
lineComment
in interface JCommentable
public JComment deprecated()
JDocCommentable
deprecated
in interface JDocCommentable
public JDocComment docComment()
JDocCommentable
docComment
in interface JDocCommentable
public JAnnotation annotate(java.lang.Class<? extends java.lang.annotation.Annotation> type)
JAnnotatable
annotate
in interface JAnnotatable
type
- the type of the annotation to addpublic JAnnotation annotate(JType type)
JAnnotatable
annotate
in interface JAnnotatable
type
- the type of the annotation to addpublic JAnnotation annotate(java.lang.String type)
JAnnotatable
annotate
in interface JAnnotatable
type
- the type of the annotation to addpublic JVarDeclaration add(java.lang.String name)
JVarDeclaration
add
in interface JVarDeclaration
name
- the variable namepublic JVarDeclaration add(java.lang.String name, JExpr init)
JVarDeclaration
add
in interface JVarDeclaration
name
- the variable nameinit
- the variable initializerpublic JType type()
JVarDeclaration
type
in interface JVarDeclaration