Class MetaArgument
- java.lang.Object
-
- ru.ispras.microtesk.model.metadata.MetaArgument
-
-
Constructor Summary
Constructors Constructor Description MetaArgument(java.lang.String name, Type type)
Constructs a meta argument object for an immediate argument.MetaArgument(java.lang.String name, IsaPrimitiveKind kind, ArgumentMode mode, java.util.Set<java.lang.String> typeNames, Type dataType)
Constructs a meta argument object.MetaArgument(java.lang.String name, MetaAddressingMode type, ArgumentMode mode)
Constructs a meta argument object for an addressing mode argument.MetaArgument(java.lang.String name, MetaGroup type, ArgumentMode mode)
Constructs a meta argument object for an group.MetaArgument(java.lang.String name, MetaOperation type, ArgumentMode mode)
Constructs a meta argument object for an operation argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Type
getDataType()
Returns the data type associated with the argument.IsaPrimitiveKind
getKind()
Returns the kind of object associated with the argument.ArgumentMode
getMode()
Returns the usage mode of the argument.java.lang.String
getName()
Returns the name of the argument.java.util.Collection<java.lang.String>
getTypeNames()
Returns an iterator for the collection of type names associated with the argument.boolean
isTypeAccepted(java.lang.String typeName)
Checks whether if the specified type is accepted for the argument.java.lang.String
toString()
-
-
-
Constructor Detail
-
MetaArgument
public MetaArgument(java.lang.String name, Type type)
Constructs a meta argument object for an immediate argument.- Parameters:
name
- argument name.type
- the data type associated with the argument.- Throws:
java.lang.IllegalArgumentException
- if any argument isnull
.
-
MetaArgument
public MetaArgument(java.lang.String name, MetaAddressingMode type, ArgumentMode mode)
Constructs a meta argument object for an addressing mode argument.- Parameters:
name
- argument name.type
- object describing the argument type.mode
- the usage mode of the argument.- Throws:
java.lang.IllegalArgumentException
- if any argument isnull
.
-
MetaArgument
public MetaArgument(java.lang.String name, MetaOperation type, ArgumentMode mode)
Constructs a meta argument object for an operation argument.- Parameters:
name
- argument name.type
- object describing the argument type.mode
- the usage mode of the argument.- Throws:
java.lang.IllegalArgumentException
- if any argument isnull
.
-
MetaArgument
public MetaArgument(java.lang.String name, MetaGroup type, ArgumentMode mode)
Constructs a meta argument object for an group.- Parameters:
name
- argument name.type
- object describing the argument type.mode
- the usage mode of the argument.- Throws:
java.lang.IllegalArgumentException
- if any argument isnull
.
-
MetaArgument
public MetaArgument(java.lang.String name, IsaPrimitiveKind kind, ArgumentMode mode, java.util.Set<java.lang.String> typeNames, Type dataType)
Constructs a meta argument object.- Parameters:
name
- argument name.kind
- the kind of object associated with the argument.mode
- the usage mode of the argument.typeNames
- the set of of type names associated with the argument.dataType
- the data type associated with the argument.- Throws:
java.lang.IllegalArgumentException
- if any argument except fordataType
isnull
; if the set of type names is empty.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the argument.
-
getDataType
public Type getDataType()
Returns the data type associated with the argument. Applicable to immediate values and addressing modes. For operations, it returnsnull
.- Specified by:
getDataType
in interfaceMetaData
- Returns:
- Argument data type.
-
getKind
public IsaPrimitiveKind getKind()
Returns the kind of object associated with the argument.- Returns:
- Argument kind.
-
getMode
public ArgumentMode getMode()
Returns the usage mode of the argument.- Returns:
- Argument usage mode.
-
getTypeNames
public java.util.Collection<java.lang.String> getTypeNames()
Returns an iterator for the collection of type names associated with the argument.- Returns:
- An
Iterable
object that refers to the collection of type names (e.g. addressing mode names).
-
isTypeAccepted
public boolean isTypeAccepted(java.lang.String typeName)
Checks whether if the specified type is accepted for the argument.- Parameters:
typeName
- Type name.- Returns:
true
if the specified type is accepted for the argument offalse
otherwise.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-