Package org.jboss.jdeparser
Interface JVarDeclaration
- All Superinterfaces:
JAnnotatable
,JCommentable
,JDocCommentable
- All Known Implementing Classes:
FirstJVarDeclaration
,SuccessorJVarDeclaration
,TryJVarDeclaration
A variable declaration.
-
Method Summary
Methods inherited from interface org.jboss.jdeparser.JAnnotatable
annotate, annotate, annotate
Methods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineComment
Methods inherited from interface org.jboss.jdeparser.JDocCommentable
deprecated, docComment
-
Method Details
-
type
JType type()Get the variable type.- Returns:
- the variable type
-
name
String name()Get the variable name.- Returns:
- the variable name
-
add
Add another item to this declaration. Subsequent items always have the same type as this item.- Parameters:
name
- the variable nameinit
- the variable initializer- Returns:
- the subsequent declaration
-
add
Add another item to this declaration. Subsequent items always have the same type as this item.- Parameters:
name
- the variable name- Returns:
- the subsequent declaration
-