public class MetaOperation extends java.lang.Object implements MetaData
MetaOperation
class stores information on the given operation.Modifier | Constructor and Description |
---|---|
protected |
MetaOperation(java.lang.String name,
java.lang.String typeName,
boolean isRoot,
boolean branch,
boolean conditionalBranch,
boolean exception,
boolean load,
boolean store,
int blockSize) |
|
MetaOperation(java.lang.String name,
java.lang.String typeName,
boolean isRoot,
java.util.Map<java.lang.String,MetaArgument> args,
java.util.Map<java.lang.String,MetaShortcut> shortcuts,
boolean branch,
boolean conditionalBranch,
boolean exception,
boolean load,
boolean store,
int blockSize) |
Modifier and Type | Method and Description |
---|---|
protected void |
addArgument(MetaArgument argument) |
protected void |
addShortcut(java.lang.String contextName,
MetaOperation operation) |
boolean |
canThrowException()
Checks whether the current operation can throw an exception.
|
MetaArgument |
getArgument(java.lang.String name)
Return an argument of the given operation that has the specified name.
|
java.lang.Iterable<MetaArgument> |
getArguments()
Returns a collection of operation arguments.
|
int |
getBlockSize()
Returns the size of block read or written to memory.
|
Type |
getDataType()
Returns the type associated with the metadata element or
null
if the element has no type. |
java.lang.String |
getName()
Returns the operation name.
|
MetaShortcut |
getShortcut(java.lang.String contextName)
Returns a shortcut for the given operation that can be used in the specified context.
|
java.lang.Iterable<MetaShortcut> |
getShortcuts()
Returns a collection of shortcuts applicable to the given operation in different contexts.
|
java.lang.String |
getTypeName()
Returns the type name of the operation.
|
boolean |
hasRootShortcuts()
Checks whether the current operation has root shortcuts.
|
boolean |
isBranch()
Checks whether the operation is a branch operation (causes control transfer).
|
boolean |
isConditionalBranch()
Checks whether the operation is a conditional branch operation
(causes control transfer on some condition).
|
boolean |
isLoad()
Checks whether the operation performs a memory load action.
|
boolean |
isRoot()
Checks whether the current operation is a root.
|
boolean |
isStore()
Checks whether the operation performs a memory store action.
|
public MetaOperation(java.lang.String name, java.lang.String typeName, boolean isRoot, java.util.Map<java.lang.String,MetaArgument> args, java.util.Map<java.lang.String,MetaShortcut> shortcuts, boolean branch, boolean conditionalBranch, boolean exception, boolean load, boolean store, int blockSize)
protected MetaOperation(java.lang.String name, java.lang.String typeName, boolean isRoot, boolean branch, boolean conditionalBranch, boolean exception, boolean load, boolean store, int blockSize)
protected final void addArgument(MetaArgument argument)
protected final void addShortcut(java.lang.String contextName, MetaOperation operation)
public final java.lang.String getName()
public final java.lang.String getTypeName()
public final Type getDataType()
MetaData
null
if the element has no type.getDataType
in interface MetaData
null
if the element has no type.public final boolean isRoot()
true
if it is a root operation or false
otherwise.public final java.lang.Iterable<MetaArgument> getArguments()
public final MetaArgument getArgument(java.lang.String name)
name
- Argument name.null
if no such argument is defined.public final java.lang.Iterable<MetaShortcut> getShortcuts()
public final MetaShortcut getShortcut(java.lang.String contextName)
contextName
- Context name.null
if no such shortcut exists.public final boolean hasRootShortcuts()
true
if it the operation has root shortcuts or false
otherwise.public final boolean isBranch()
true
if the operation is a branch operation
or false
otherwise.public final boolean isConditionalBranch()
true
if the operation is a conditional branch operation
or false
otherwise.public final boolean canThrowException()
true
if the operation can throw an exception
or false
otherwise.public final boolean isLoad()
NOTE: This covers only situations when a load can be unambiguously defected by exploring operation attributes. For situations when a memory access is performed via parameters (other operation or addressing modes) which can be dynamically chosen (OR rules), these parameters (their meta data) must be examined additionally to make a conclusion.
true
if the operation performs a memory load action
or false
otherwise.public final boolean isStore()
NOTE: This covers only situations when a load can be unambiguously defected by exploring operation attributes. For situations when a memory access is performed via parameters (other operation or addressing modes) which can be dynamically chosen (OR rules), these parameters (their meta data) must be examined additionally to make a conclusion.
true
if the operation performs a memory store action
or false
otherwise.public final int getBlockSize()