public class FieldSpecification extends VariableSpecification implements Field
dimensions, initializer, type, var
Constructor and Description |
---|
FieldSpecification()
Field specification.
|
FieldSpecification(ExtList children,
ProgramVariable var,
int dimensions,
Type type)
Field specification.
|
FieldSpecification(ProgramVariable var) |
FieldSpecification(ProgramVariable var,
Expression init,
Type type)
Field specification.
|
FieldSpecification(ProgramVariable var,
int dimensions,
Expression init,
Type type)
Field specification.
|
FieldSpecification(ProgramVariable var,
Type type)
Field specification.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getProgramName()
returns the name of the field as used in programs.
|
boolean |
isPrivate()
Test whether the declaration is private.
|
boolean |
isProtected()
Test whether the declaration is protected.TO BE IMPLEMENTED
|
boolean |
isPublic()
Test whether the declaration is public.TO BE IMPLEMENTED
|
boolean |
isStatic()
Test whether the declaration is static.
|
boolean |
isStrictFp()
Test whether the declaration is strictFp.TO BE IMPLEMENTED
|
boolean |
isTransient()
Test whether the declaration is transient.TO BE IMPLEMENTED
|
boolean |
isVolatile()
Test whether the declaration is volatile.TO BE IMPLEMENTED
|
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to
perform some action/transformation on this element
|
computeHashCode, equals, equalsModRenaming, getChildAt, getChildCount, getDimensions, getExpressionAt, getExpressionCount, getFirstElement, getFullName, getInitializer, getLastElement, getName, getProgramElementName, getProgramVariable, getType, hasInitializer, isFinal, match, prettyPrint
compatibleBlockSize, getArrayPos, matchChildren
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getProgramVariable
getFullName
getName
getComments
getEndPosition, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPosition
public FieldSpecification()
public FieldSpecification(ProgramVariable var)
public FieldSpecification(ProgramVariable var, Type type)
var
- the ProgramVariable representing this concrete fieldtype
- the Type of this fieldpublic FieldSpecification(ProgramVariable var, Expression init, Type type)
var
- the ProgramVariable representing this concrete fieldinit
- the Expression the field is initialised with.type
- the Type of this fieldpublic FieldSpecification(ProgramVariable var, int dimensions, Expression init, Type type)
var
- the ProgramVariable representing this concrete fielddimensions
- an int defining the dimensioninit
- the Expression the field is initialised with.type
- the Type of this fieldpublic FieldSpecification(ExtList children, ProgramVariable var, int dimensions, Type type)
children
- an ExtList with the children.
May contain:
an Expression (as initializer of the variable)
a ProgramElementName (as name of the variable)
a Commentvar
- the ProgramVariable representing this concrete fielddimensions
- an int defining the dimensiontype
- the Type of this fieldpublic java.lang.String getProgramName()
getProgramName
in interface Field
public boolean isStatic()
public boolean isPrivate()
public boolean isProtected()
isProtected
in interface Member
true
if this member is protected,
false
otherwise.public boolean isPublic()
public boolean isTransient()
public boolean isVolatile()
public boolean isStrictFp()
isStrictFp
in interface Member
true
if this member is strictfp,
false
otherwise.public void visit(Visitor v)
visit
in interface SourceElement
visit
in class VariableSpecification
v
- the Visitor