Package org.jboss.jdeparser
Interface JVarDeclaration
-
- All Superinterfaces:
JAnnotatable
,JCommentable
,JDocCommentable
public interface JVarDeclaration extends JAnnotatable, JDocCommentable
A variable declaration.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.java.lang.String
name()
Get the variable name.JType
type()
Get the variable type.-
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 Detail
-
type
JType type()
Get the variable type.- Returns:
- the variable type
-
name
java.lang.String name()
Get the variable name.- Returns:
- the variable name
-
add
JVarDeclaration add(java.lang.String name, JExpr init)
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
JVarDeclaration add(java.lang.String name)
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
-
-