Class MetaArgument

  • All Implemented Interfaces:
    MetaData

    public final class MetaArgument
    extends java.lang.Object
    implements MetaData
    The MetaArgument class describes arguments or addressing modes and operations.
    • 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 is null.
      • 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 is null.
      • 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 is null.
      • 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 is null.
      • 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 for dataType is null; if the set of type names is empty.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the argument.
        Specified by:
        getName in interface MetaData
        Returns:
        Argument name.
      • getDataType

        public Type getDataType()
        Returns the data type associated with the argument. Applicable to immediate values and addressing modes. For operations, it returns null.
        Specified by:
        getDataType in interface MetaData
        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 of false otherwise.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object