Class MetaClass

    • Constructor Detail

      • MetaClass

        public MetaClass()
        Creates an empty Metaclass
      • MetaClass

        public MetaClass​(String newnamespace,
                         String newname,
                         UserType newparentType,
                         boolean newisAbstract)
        MetaClass constructor with provided specifications and IDs
        Parameters:
        newnamespace - Namespace to set
        newname - Name to be set
        newparentType - Type of the parent class (can be null)
        newisAbstract - Indicates class is abstract
    • Method Detail

      • getName

        public String getName()
        Get the MetaClass::name
        Returns:
        the name
      • setName

        public void setName​(String newname)
        Set the MetaClass::name
        Parameters:
        newname - the name to set
      • getParentType

        public UserType getParentType()
        Get the MetaClass::parentType
        Returns:
        the parentType
      • setParentType

        public void setParentType​(UserType newparentType)
        Set the MetaClass::parentType
        Parameters:
        newparentType - the parentType
      • getProperties

        public List<Property> getProperties()
        Get the MetaClass::properties
        Returns:
        the properties
      • setProperties

        public void setProperties​(SortedSet<Property> newproperties)
        Set the MetaClass::properties
        Parameters:
        newproperties - the properties
      • setProperties

        public void setProperties​(List<Property> newproperties)
        Set the MetaClass::properties
        Parameters:
        newproperties - the properties This is YAML friendly for lists --instead of sets which Python doesn't like because they contain non-hashable fields.
      • getOperations

        public List<Operation> getOperations()
        Get the MetaClass::operations
        Returns:
        the operations
      • setOperations

        public void setOperations​(Set<Operation> newoperations)
        Set the MetaClass::operations
        Parameters:
        newoperations - the operations
      • setOperations

        public void setOperations​(List<Operation> newoperations)
        Set the MetaClass::operations
        Parameters:
        newoperations - the operations This is YAML friendly for lists --instead of sets which Python doesn't like because they contain non-hashable fields.
      • addPropertyAsEnrichment

        public boolean addPropertyAsEnrichment​(Property newproperty)
        Add a new property to the list of properties
        Parameters:
        newproperty - property to add
        Returns:
        TRUE if property was not found and added. FALSE, otherwise.
      • addProperty

        public boolean addProperty​(Property newproperty,
                                   int position)
        Add a new property to the list of properties
        Parameters:
        newproperty - property to add
        position - position of the property
        Returns:
        TRUE if property was not found and added. FALSE, otherwise.
      • addOperation

        public boolean addOperation​(Operation newoperation)
        Add a new operation to the list of operations
        Parameters:
        newoperation - Operation to add
        Returns:
        TRUE if Operation was not found and added. FALSE, otherwise.
      • existsPropertyInClass

        public boolean existsPropertyInClass​(PropertyID propertyID)
        This operation verifies if a Property identified by propertyID exists
        Parameters:
        propertyID - ID of the property to query
        Returns:
        TRUE if the provided property exists in the MetaClass. FALSE otherwise.
      • existsPropertyInClass

        public boolean existsPropertyInClass​(String propertyName)
        This operation verifies if a Property with the name provided exists
        Parameters:
        propertyName - Name of the property to query
        Returns:
        TRUE if the provided property exists in the MetaClass. FALSE otherwise.
      • existsOperationInClass

        public boolean existsOperationInClass​(OperationID operationID)
        This operation verifies if a Operation identified by operationID exists
        Parameters:
        operationID - ID of the operation to query
        Returns:
        TRUE if the provided operation exists in the MetaClass. FALSE otherwise.
      • removeOperation

        public boolean removeOperation​(OperationID operationID)
        This operation remove a Operation identified by operationID in the list of operations.
        Parameters:
        operationID - ID of the operation to remove
        Returns:
        TRUE if the provided Operation was successfully removed from system. FALSE otherwise.
      • getNamespace

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

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

        public Operation getOperation​(OperationID operationID)
        Get operation identified by id provided
        Parameters:
        operationID - Operation ID
        Returns:
        Operation or NULL if not exists.
      • getProperty

        public Property getProperty​(PropertyID propertyID)
        Get property identified by id provided
        Parameters:
        propertyID - property ID
        Returns:
        property or NULL if not exists.
      • getImplementation

        public Implementation getImplementation​(ImplementationID implID)
        Get Implementation identified by id provided
        Parameters:
        implID - Implementation ID
        Returns:
        Implementation or NULL if not exists.
      • getImplementationAndOperation

        public Tuple<Operation,​Implementation> getImplementationAndOperation​(ImplementationID implementationID)
        Get the implementation with ID provided and the associated operation or NULL if not found.
        Parameters:
        implementationID - ID of the implementation to seek
        Returns:
        implementation with ID provided and the associated operation or NULL if not found.
      • getJavaClassInfo

        public JavaClassInfo getJavaClassInfo()
        Get Java language-dependant information of the class
        Returns:
        Java language-dependant information of the class
      • getPythonClassInfo

        public PythonClassInfo getPythonClassInfo()
        Get Python language-dependant information of the class
        Returns:
        Python language-dependant information of the class
      • addLanguageDepInfo

        public void addLanguageDepInfo​(LanguageDependantClassInfo langClassInfo)
        Add language dependant class information
        Parameters:
        langClassInfo - Language class information
      • getIsAbstract

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

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

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

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

        public List<ECA> getEcas()
        Returns:
        the ecas
      • setEcas

        public void setEcas​(List<ECA> newEcas)
        Parameters:
        newEcas - the ecas to set
      • hashCode

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

        public Operation getOperation​(String opNameAndDescriptor)
        Get operation with method name and descriptor provided
        Parameters:
        opNameAndDescriptor - method name and descriptor of the operation
        Returns:
        Operation with name and descriptor provided or null if not present.