recoder.bytecode
Class ByteCodeElement
java.lang.Object
recoder.bytecode.ByteCodeElement
- All Implemented Interfaces:
- ProgramModelElement, AccessFlags, ModelElement, NamedModelElement
- Direct Known Subclasses:
- ClassFile, MemberInfo
public abstract class ByteCodeElement
- extends java.lang.Object
- implements ProgramModelElement
| Fields inherited from interface recoder.bytecode.AccessFlags |
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
accessFlags
protected int accessFlags
service
protected ProgramModelInfo service
ByteCodeElement
public ByteCodeElement()
ByteCodeElement
public ByteCodeElement(int accessFlags)
ByteCodeElement
public ByteCodeElement(int accessFlags,
java.lang.String name)
getName
public final java.lang.String getName()
- Returns the name of the byte code element. Strings are interned so that
they can be compared by identity.
- Specified by:
getName in interface NamedModelElement
- Returns:
- the name of the model element.
getTypeName
public abstract java.lang.String getTypeName()
getAccessFlags
public final int getAccessFlags()
setAccessFlags
public void setAccessFlags(int accessFlags)
isAbstract
public boolean isAbstract()
isFinal
public boolean isFinal()
isStatic
public boolean isStatic()
isPrivate
public boolean isPrivate()
isProtected
public boolean isProtected()
isPublic
public boolean isPublic()
isStrictFp
public boolean isStrictFp()
isNative
public boolean isNative()
isSynchronized
public boolean isSynchronized()
getProgramModelInfo
public ProgramModelInfo getProgramModelInfo()
- Description copied from interface:
ProgramModelElement
- Returns the instance that can retrieve information about this program
model element.
- Specified by:
getProgramModelInfo in interface ProgramModelElement
- Returns:
- the program model info of this element.
setProgramModelInfo
public void setProgramModelInfo(ProgramModelInfo service)
- Description copied from interface:
ProgramModelElement
- Sets the instance that can retrieve information about this program model
element. Should not be called from outside a service.
- Specified by:
setProgramModelInfo in interface ProgramModelElement
- Parameters:
service - the program model info to be used for this element.
validate
public void validate()
throws ModelException
- Description copied from interface:
ModelElement
- Check consistency and admissibility of a construct, e.g. cardinality of
participants. Should only check syntactical correctness,
not semantical correctness.
For checking, e.g., if an AST element of type recoder.java.statement.If
has a boolean parameter as condition,
recoder.service.SemanticsChecker
- Specified by:
validate in interface ModelElement
- Throws:
ModelException- See Also:
SemanticsChecker