Class AbstractRefPackage

  • All Implemented Interfaces:
    MapOwner, AbstractRefBaseObject, RepositoryProvider, javax.jmi.reflect.RefBaseObject, javax.jmi.reflect.RefPackage
    Direct Known Subclasses:
    AbstractRepository, EcoreRefPackage

    public abstract class AbstractRefPackage
    extends com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl
    implements javax.jmi.reflect.RefPackage
    The RefPackage interface is an abstraction for accessing a collection of objects and their associations. The interface provides an operation to access the meta object description for the package, and operations to access the package instance's class proxy objects and its association objects
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map mAssociations  
      private java.util.Map mClasses  
      private java.util.Map mMetaObjects  
      private java.util.Map mPackages  
      • Fields inherited from class com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl

        mMetaObject, repository
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAssociation​(java.lang.String name, javax.jmi.reflect.RefAssociation assoc)  
      void addClass​(java.lang.String name, javax.jmi.reflect.RefClass clazz)  
      void addPackage​(java.lang.String name, javax.jmi.reflect.RefBaseObject pack)  
      java.util.Map getMetaObjects()  
      void internalError​(java.lang.String string, javax.jmi.reflect.InvalidCallException ex)  
      java.util.Collection refAllAssociations()
      The refAllAssociation operation returns all associations directly contained by this package.
      java.util.Collection refAllClasses()
      The refAllClasses operation returns all class proxies directly contained by this package.
      java.util.Collection refAllPackages()
      Returns a (possible empty) collection of RefPackages directly contained by this package.
      javax.jmi.reflect.RefAssociation refAssociation​(java.lang.String associationName)
      The association (or associationName ) parameter should designate the (M2) association whose association object is to be returned.
      javax.jmi.reflect.RefAssociation refAssociation​(javax.jmi.reflect.RefObject association)  
      javax.jmi.reflect.RefClass refClass​(java.lang.String className)
      The type (or className ) parameter should designate the class whose class proxy object is to be returned.
      javax.jmi.reflect.RefClass refClass​(javax.jmi.reflect.RefObject type)  
      javax.jmi.reflect.RefStruct refCreateStruct​(java.lang.String structName, java.util.List args)
      The refCreateStruct operation creates an instance of a struct data type defined by the metaobject structType (or structName ) whose attribute values are specified by the ordered collection args .
      javax.jmi.reflect.RefStruct refCreateStruct​(javax.jmi.reflect.RefObject structType, java.util.List name)  
      void refDelete()
      The "refDelete" operation destroys this package, including the objects it contains directly or transitively.
      javax.jmi.reflect.RefEnum refGetEnum​(java.lang.String enumName, java.lang.String args)
      The refGetEnum operation returns the instance of an enumeration (i.e., an enumeration literal) whose value is described by the value of literalName .
      javax.jmi.reflect.RefEnum refGetEnum​(javax.jmi.reflect.RefObject enumType, java.lang.String args)  
      javax.jmi.reflect.RefPackage refPackage​(java.lang.String nestedPackageName)
      The "nestedPackage" (or nestedPackageName ) parameter should designate the package whose package object is to be returned.
      javax.jmi.reflect.RefPackage refPackage​(javax.jmi.reflect.RefObject nestedPackage)  
      void removeClass​(AbstractRefClass clazz)  
      void removePackage​(javax.jmi.reflect.RefBaseObject pack)  
      • Methods inherited from class com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl

        getRepository, mapClear, mapPut, mapPutAll, mapRemove, mof_getRepository, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints, setMofID, setOwner, setRefMetaObject, setRepository
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.jmi.reflect.RefBaseObject

        equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints
    • Field Detail

      • mClasses

        private final java.util.Map mClasses
      • mAssociations

        private final java.util.Map mAssociations
      • mMetaObjects

        private final java.util.Map mMetaObjects
      • mPackages

        private final java.util.Map mPackages
    • Constructor Detail

      • AbstractRefPackage

        public AbstractRefPackage​(@CheckForNull
                                  AbstractRepository repository)
        Parameters:
        repository -
    • Method Detail

      • addAssociation

        public void addAssociation​(java.lang.String name,
                                   javax.jmi.reflect.RefAssociation assoc)
        Parameters:
        name -
        assoc -
      • refAllAssociations

        public java.util.Collection refAllAssociations()
        The refAllAssociation operation returns all associations directly contained by this package. Returns a (possible empty) collection of RefAssociations directly contained by this package.
        Specified by:
        refAllAssociations in interface javax.jmi.reflect.RefPackage
      • refAllClasses

        public java.util.Collection refAllClasses()
        The refAllClasses operation returns all class proxies directly contained by this package. Returns a (possible empty) collection of RefClasses directly contained by this package.
        Specified by:
        refAllClasses in interface javax.jmi.reflect.RefPackage
      • refAssociation

        public javax.jmi.reflect.RefAssociation refAssociation​(javax.jmi.reflect.RefObject association)
        Specified by:
        refAssociation in interface javax.jmi.reflect.RefPackage
      • refAssociation

        public javax.jmi.reflect.RefAssociation refAssociation​(java.lang.String associationName)
        The association (or associationName ) parameter should designate the (M2) association whose association object is to be returned. The refAssociation operations return an association object for a given association. specific analog: get () return type: RefAssociation isQuery: yes parameters: RefObject association (or String associationName) exceptions: JmiException (InvalidCallException, InvalidNameException)
        Specified by:
        refAssociation in interface javax.jmi.reflect.RefPackage
      • refClass

        public javax.jmi.reflect.RefClass refClass​(javax.jmi.reflect.RefObject type)
        Specified by:
        refClass in interface javax.jmi.reflect.RefPackage
      • refClass

        public javax.jmi.reflect.RefClass refClass​(java.lang.String className)
        The type (or className ) parameter should designate the class whose class proxy object is to be returned. InvalidCallException is raised if the type parameter does not designate a valid class. InvalidNameException is raised when the className does not denote a valid class name. The refClass operations return the class proxy object for a given class. specific analog: get () return type: RefClass isQuery: yes parameters: RefObject type (or String className) exceptions: JmiException (InvalidCallException, InvalidNameException)
        Specified by:
        refClass in interface javax.jmi.reflect.RefPackage
      • refCreateStruct

        public javax.jmi.reflect.RefStruct refCreateStruct​(javax.jmi.reflect.RefObject structType,
                                                           java.util.List name)
        Specified by:
        refCreateStruct in interface javax.jmi.reflect.RefPackage
      • refCreateStruct

        public javax.jmi.reflect.RefStruct refCreateStruct​(java.lang.String structName,
                                                           java.util.List args)
        The refCreateStruct operation creates an instance of a struct data type defined by the metaobject structType (or structName ) whose attribute values are specified by the ordered collection args . The members of the args list correspond 1-to-1 to the parameters for the specific create operation. They must be encoded as per Generation Rules for Parameters on page 56. InvalidCallException is raised if the structType parameter does not designate a struct type. InvalidNameException is raised when the structName does not denote a valid struct name. This refCreateStruct operations create a new instance of a struct data type. specific analog: create (...); return type: RefStruct parameters: RefObject structType (or String structName), List args exceptions: JmiException (WrongSizeException, TypeMismatchException, InvalidObjectException, InvalidCallException, InvalidNameException, java.lang.NullPointerException)
        Specified by:
        refCreateStruct in interface javax.jmi.reflect.RefPackage
      • refDelete

        public void refDelete()
        The "refDelete" operation destroys this package, including the objects it contains directly or transitively. Deletion of an outermost package causes all objects within its extent to be deleted.
        Specified by:
        refDelete in interface javax.jmi.reflect.RefPackage
      • refGetEnum

        public javax.jmi.reflect.RefEnum refGetEnum​(javax.jmi.reflect.RefObject enumType,
                                                    java.lang.String args)
        Specified by:
        refGetEnum in interface javax.jmi.reflect.RefPackage
      • refGetEnum

        public javax.jmi.reflect.RefEnum refGetEnum​(java.lang.String enumName,
                                                    java.lang.String args)
        The refGetEnum operation returns the instance of an enumeration (i.e., an enumeration literal) whose value is described by the value of literalName . Note that the type of enumeration is defined by the meta object that owns the metaLiteral object. InvalidCallException is raised if the enumType parameter does not designate a valid enumeration. InvalidNameException is raised when the enumName does not denote a valid enum name. This refGetEnum returns the enumeration object representing the enumeration literal. specific analog: none. return type: RefEnum parameters: RefObject enumType (or String enumName ) String literalName exceptions: JmiException (TypeMismatchException, InvalidCallException, InvalidNameException, java.lang.NullPointerException)
        Specified by:
        refGetEnum in interface javax.jmi.reflect.RefPackage
      • refPackage

        public javax.jmi.reflect.RefPackage refPackage​(javax.jmi.reflect.RefObject nestedPackage)
        Specified by:
        refPackage in interface javax.jmi.reflect.RefPackage
      • refPackage

        public javax.jmi.reflect.RefPackage refPackage​(java.lang.String nestedPackageName)
        The "nestedPackage" (or nestedPackageName ) parameter should designate the package whose package object is to be returned. It must either be nested within the package for this package object, or imported with isCluster set to true. InvalidCallException is raised if the nestedPackage parameter does not designate a valid package. InvalidNameException is raised when the nestedPackageName does not denote a valid nested package name. The refPackage operations return a package object for a nested or clustered package. specific analog: get () return type: RefPackage isQuery: yes parameters: RefObject nestedPackage (or String nestedPackageName) exceptions: JmiException (InvalidCallException, InvalidNameException)
        Specified by:
        refPackage in interface javax.jmi.reflect.RefPackage
      • internalError

        public void internalError​(java.lang.String string,
                                  javax.jmi.reflect.InvalidCallException ex)
        Parameters:
        string -
        ex -
      • getMetaObjects

        public java.util.Map getMetaObjects()
        Returns:
      • addClass

        public void addClass​(java.lang.String name,
                             javax.jmi.reflect.RefClass clazz)
        Parameters:
        name -
        clazz -
      • addPackage

        public void addPackage​(java.lang.String name,
                               javax.jmi.reflect.RefBaseObject pack)
        Parameters:
        string -
        basicBehaviorsPackage2 -
      • removePackage

        public void removePackage​(javax.jmi.reflect.RefBaseObject pack)
      • refAllPackages

        public java.util.Collection refAllPackages()
        Returns a (possible empty) collection of RefPackages directly contained by this package. The Collection returned from this operation is an immutable collection. The refAllPackages operation returns all packages directly contained or clustered by this package. specific analog: None return type: Collection of RefPackages isQuery: yes parameters: None exceptions: JmiException
        Specified by:
        refAllPackages in interface javax.jmi.reflect.RefPackage