java.lang.Object
org.jboss.jdeparser.BasicJCommentable
org.jboss.jdeparser.AbstractJDocCommentable
org.jboss.jdeparser.BasicJAnnotatable
org.jboss.jdeparser.FirstJVarDeclaration
- All Implemented Interfaces:
BlockContent,ClassContent,JAnnotatable,JCommentable,JDocCommentable,JVarDeclaration,Writable
- Direct Known Subclasses:
TryJVarDeclaration
class FirstJVarDeclaration
extends BasicJAnnotatable
implements JVarDeclaration, BlockContent, ClassContent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final Stringprivate ArrayList<SuccessorJVarDeclaration> private final JTypeprivate final JExpr -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd another item to this declaration.Add another item to this declaration.(package private) intmods()name()Get the variable name.type()Get the variable type.voidwrite(SourceFileWriter writer) (package private) voidwrite(SourceFileWriter writer, FormatPreferences.Space beforeSemicolon) (package private) voidwriteNoSemi(SourceFileWriter writer) Methods inherited from class org.jboss.jdeparser.BasicJAnnotatable
annotate, annotate, annotate, writeAnnotationsMethods inherited from class org.jboss.jdeparser.AbstractJDocCommentable
deprecated, docComment, writeDocCommentsMethods inherited from class org.jboss.jdeparser.BasicJCommentable
blockComment, lineComment, writeCommentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.jdeparser.JAnnotatable
annotate, annotate, annotateMethods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineCommentMethods inherited from interface org.jboss.jdeparser.JDocCommentable
deprecated, docComment
-
Field Details
-
mods
private final int mods -
type
-
name
-
value
-
successors
-
-
Constructor Details
-
FirstJVarDeclaration
-
-
Method Details
-
write
- Specified by:
writein interfaceWritable- Throws:
IOException
-
write
- Throws:
IOException
-
writeNoSemi
- Throws:
IOException
-
type
Description copied from interface:JVarDeclarationGet the variable type.- Specified by:
typein interfaceJVarDeclaration- Returns:
- the variable type
-
name
Description copied from interface:JVarDeclarationGet the variable name.- Specified by:
namein interfaceJVarDeclaration- Returns:
- the variable name
-
mods
int mods() -
add
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
-
add
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
-