Class Operation

    • Constructor Detail

      • Operation

        public Operation()
        Creates an empty Operation
      • Operation

        public Operation​(String newname,
                         String newdescriptor,
                         String newsignature,
                         String newnameAndDescriptor,
                         String newnamespace,
                         String newclassName,
                         boolean newisAbstract)
        Operation constructor with provided specifications
        Parameters:
        newname - Name of the operation
        newdescriptor - Descriptor of the operation (signature without subtypes)
        newsignature - Signature of the operation
        newnameAndDescriptor - Name and descriptor of the operation
        newnamespace - Namespace of the class containing operation
        newclassName - Name of class of the operation
        newisAbstract - Indicates operation is abstract
    • Method Detail

      • getName

        public String getName()
        Get the name of this Operation
        Returns:
        Operation::name of container Operation.
      • setName

        public void setName​(String newname)
        Set the Operation::name of this Operation
        Parameters:
        newname - New name to be set
      • getParams

        public Map<String,​Type> getParams()
        Get the Parameters of this Operation
        Returns:
        Operation::params of container Operation.
      • getParamsTypesInOrder

        public List<Type> getParamsTypesInOrder()
        Get the Parameters types of this Operation
        Returns:
        Operation::params of container Operation.
      • setParams

        public void setParams​(Map<String,​Type> newparams)
        Set the Operation::params
        Parameters:
        newparams - Parameter to set of this Operation.
      • getParamsOrder

        public List<String> getParamsOrder()
        Get the Parameter order of this Operation
        Returns:
        Operation::paramOrder of container Operation.
      • setParamsOrder

        public void setParamsOrder​(List<String> newparamOrder)
        Set the Operation::paramOrder
        Parameters:
        newparamOrder - The list of name of parameters, in the proper order.
      • addParam

        public void addParam​(String paramName,
                             Type newparam)
        Add a new Params to the map of Params
        Parameters:
        paramName - Name of the parameter
        newparam - Param to add
      • getImplementations

        public List<Implementation> getImplementations()
        Returns:
        the implementations
      • setImplementations

        public void setImplementations​(SortedSet<Implementation> newimplementations)
        Parameters:
        newimplementations - the implementations to set
      • setImplementations

        public void setImplementations​(List<Implementation> newimplementations)
        Parameters:
        newimplementations - the implementations to set This is YAML friendly for lists --instead of sets which Python doesn't like because they contain non-hashable fields.
      • addImplementation

        public boolean addImplementation​(Implementation newimplementation)
        Add a new Implementation to the list of Implementations
        Parameters:
        newimplementation - Implementation to add
        Returns:
        TRUE if Implementation was not found and added. FALSE, otherwise.
      • existsImplementationInOperation

        public boolean existsImplementationInOperation​(ImplementationID implementationID)
        This operation verifies if a Implementation identified by implementationID exists in this Operation.
        Parameters:
        implementationID - ID of the Implementation to query
        Returns:
        TRUE if the provided Implementation exists in the Operation. FALSE otherwise.
      • getImplementationInOperation

        public Implementation getImplementationInOperation​(ImplementationID implementationID)
        Get the implementation with ID provided in this operation or NULL if it does not exist.
        Parameters:
        implementationID - ID of the implementation to get
        Returns:
        The Implementation in the operation or NULL if it does not exist.
      • removeImplementation

        public boolean removeImplementation​(ImplementationID implementationID)
        This operation remove a Implementation identified by implementationID in the list of implementations.
        Parameters:
        implementationID - ID of the implementation to remove
        Returns:
        TRUE if the provided Implementation was successfully removed from system. FALSE otherwise.
      • getReturnType

        public Type getReturnType()
        Get the Operation::returnType
        Returns:
        the returnType
      • setReturnType

        public void setReturnType​(Type newreturnType)
        Set the Operation::returnType
        Parameters:
        newreturnType - the returnType
      • getMetaClassID

        public MetaClassID getMetaClassID()
        Get the Operation::metaClassID
        Returns:
        the metaClassID
      • setMetaClassID

        public void setMetaClassID​(MetaClassID newmetaClassID)
        Set the Operation::metaClassID
        Parameters:
        newmetaClassID - the metaClassID to set
      • getJavaOperationInfo

        public JavaOperationInfo getJavaOperationInfo()
        Get Java language-dependant information of the operation
        Returns:
        Java language-dependant information of the operation
      • getPythonOperationInfo

        public PythonOperationInfo getPythonOperationInfo()
        Get Python language-dependant information of the operation
        Returns:
        Python language-dependant information of the operation
      • addLanguageDepInfo

        public void addLanguageDepInfo​(LanguageDependantOperationInfo langInfo)
        Add language dependant information
        Parameters:
        langInfo - Language information
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getIsAbstract

        public boolean getIsAbstract()
        Get the Operation::isAbstract
        Returns:
        the isAbstract
      • setIsAbstract

        public void setIsAbstract​(boolean newisAbstract)
        Set the Operation::isAbstract
        Parameters:
        newisAbstract - the isAbstract to set
      • getIsStaticConstructor

        public boolean getIsStaticConstructor()
        Get the Operation::isStaticConstructor
        Returns:
        the isStaticConstructor
      • setIsStaticConstructor

        public void setIsStaticConstructor​(boolean newisStaticConstructor)
        Set the Operation::isStaticConstructor
        Parameters:
        newisStaticConstructor - the isStaticConstructor to set
      • getNamespaceID

        public NamespaceID getNamespaceID()
        Get the Operation::namespaceID
        Returns:
        the namespaceID
      • setNamespaceID

        public void setNamespaceID​(NamespaceID newnamespaceID)
        Set the Operation::namespaceID
        Parameters:
        newnamespaceID - the namespaceID to set
      • getNamespace

        public String getNamespace()
        Get namespace
        Returns:
        the namespace
      • setNamespace

        public void setNamespace​(String newnamespace)
        Set namespace
        Parameters:
        newnamespace - the namespace to set
      • getClassName

        public String getClassName()
        Get className
        Returns:
        the className
      • setClassName

        public void setClassName​(String newclassName)
        Set className
        Parameters:
        newclassName - the className to set
      • getSignature

        public String getSignature()
        Generate operation signature
        Returns:
        Signature of the operation
      • setSignature

        public void setSignature​(String newsignature)
        Set the Operation::signature
        Parameters:
        newsignature - the signature to set
      • getDescriptor

        public String getDescriptor()
        Get descriptor
        Returns:
        the descriptor
      • setDescriptor

        public void setDescriptor​(String newdescriptor)
        Set descriptor
        Parameters:
        newdescriptor - the descriptor to set
      • getNameAndDescriptor

        public String getNameAndDescriptor()
        Get nameAndDescriptor
        Returns:
        the nameAndDescriptor
      • setNameAndDescriptor

        public void setNameAndDescriptor​(String newnameAndDescriptor)
        Set nameAndDescriptor
        Parameters:
        newnameAndDescriptor - the nameAndDescriptor to set
      • getAnnotations

        public List<Annotation> getAnnotations()
        Get annotations
        Returns:
        List of operation's annotations
      • setAnnotations

        public void setAnnotations​(List<Annotation> annotations)
        Set annotations
        Parameters:
        annotations - the list of annotations to set
      • addAnnotation

        public void addAnnotation​(Annotation annotation)
        Add an annotation to the operation
        Parameters:
        annotation - the annotation to add