public interface JVarDeclaration extends JAnnotatable, JDocCommentable
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.
|
java.lang.String |
name()
Get the variable name.
|
JType |
type()
Get the variable type.
|
annotate, annotate, annotate
deprecated, docComment
blockComment, lineComment
JType type()
java.lang.String name()
JVarDeclaration add(java.lang.String name, JExpr init)
name
- the variable nameinit
- the variable initializerJVarDeclaration add(java.lang.String name)
name
- the variable name