Package org.jboss.jdeparser
Class SuccessorJVarDeclaration
- java.lang.Object
-
- org.jboss.jdeparser.SuccessorJVarDeclaration
-
- All Implemented Interfaces:
JAnnotatable,JCommentable,JDocCommentable,JVarDeclaration
class SuccessorJVarDeclaration extends java.lang.Object implements JVarDeclaration
-
-
Field Summary
Fields Modifier and Type Field Description private FirstJVarDeclarationfirstprivate java.lang.Stringnameprivate JExprvalue
-
Constructor Summary
Constructors Constructor Description SuccessorJVarDeclaration(FirstJVarDeclaration first, java.lang.String name, JExpr value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JVarDeclarationadd(java.lang.String name)Add another item to this declaration.JVarDeclarationadd(java.lang.String name, JExpr init)Add another item to this declaration.JAnnotationannotate(java.lang.Class<? extends java.lang.annotation.Annotation> type)Add an annotation.JAnnotationannotate(java.lang.String type)Add an annotation.JAnnotationannotate(JType type)Add an annotation.JCommentblockComment()Add a block comment.JCommentdeprecated()Mark this program element as deprecated.JDocCommentdocComment()Get or create the doc comment for this element.(package private) JExprgetValue()JCommentlineComment()Add a line comment.java.lang.Stringname()Get the variable name.JTypetype()Get the variable type.
-
-
-
Field Detail
-
first
private final FirstJVarDeclaration first
-
name
private final java.lang.String name
-
value
private final JExpr value
-
-
Constructor Detail
-
SuccessorJVarDeclaration
SuccessorJVarDeclaration(FirstJVarDeclaration first, java.lang.String name, JExpr value)
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from interface:JVarDeclarationGet the variable name.- Specified by:
namein interfaceJVarDeclaration- Returns:
- the variable name
-
getValue
JExpr getValue()
-
blockComment
public JComment blockComment()
Description copied from interface:JCommentableAdd a block comment.- Specified by:
blockCommentin interfaceJCommentable- Returns:
- the block comment body
-
lineComment
public JComment lineComment()
Description copied from interface:JCommentableAdd a line comment.- Specified by:
lineCommentin interfaceJCommentable- Returns:
- the line comment body
-
deprecated
public JComment deprecated()
Description copied from interface:JDocCommentableMark this program element as deprecated.- Specified by:
deprecatedin interfaceJDocCommentable- Returns:
- the deprecation tag body
-
docComment
public JDocComment docComment()
Description copied from interface:JDocCommentableGet or create the doc comment for this element.- Specified by:
docCommentin interfaceJDocCommentable- Returns:
- the doc comment body
-
annotate
public JAnnotation annotate(java.lang.Class<? extends java.lang.annotation.Annotation> type)
Description copied from interface:JAnnotatableAdd an annotation.- Specified by:
annotatein interfaceJAnnotatable- Parameters:
type- the type of the annotation to add- Returns:
- the new annotation
-
annotate
public JAnnotation annotate(JType type)
Description copied from interface:JAnnotatableAdd an annotation.- Specified by:
annotatein interfaceJAnnotatable- Parameters:
type- the type of the annotation to add- Returns:
- the new annotation
-
annotate
public JAnnotation annotate(java.lang.String type)
Description copied from interface:JAnnotatableAdd an annotation.- Specified by:
annotatein interfaceJAnnotatable- Parameters:
type- the type of the annotation to add- Returns:
- the new annotation
-
add
public JVarDeclaration add(java.lang.String name)
Description copied from interface:JVarDeclarationAdd another item to this declaration. Subsequent items always have the same type as this item.- Specified by:
addin interfaceJVarDeclaration- Parameters:
name- the variable name- Returns:
- the subsequent declaration
-
add
public JVarDeclaration add(java.lang.String name, JExpr init)
Description copied from interface:JVarDeclarationAdd another item to this declaration. Subsequent items always have the same type as this item.- Specified by:
addin interfaceJVarDeclaration- Parameters:
name- the variable nameinit- the variable initializer- Returns:
- the subsequent declaration
-
type
public JType type()
Description copied from interface:JVarDeclarationGet the variable type.- Specified by:
typein interfaceJVarDeclaration- Returns:
- the variable type
-
-