Package com.nomagic.uml2.ext.jmi.reflect
Class AbstractRefClass
- java.lang.Object
-
- com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl
-
- com.nomagic.uml2.ext.jmi.reflect.AbstractRefFeaturedImpl
-
- com.nomagic.uml2.ext.jmi.reflect.AbstractRefClass
-
- All Implemented Interfaces:
MapOwner
,AbstractRefBaseObject
,AbstractRefFeatured
,DerivedPropertyOwner
,RepositoryProvider
,javax.jmi.reflect.RefBaseObject
,javax.jmi.reflect.RefClass
,javax.jmi.reflect.RefFeatured
public abstract class AbstractRefClass extends com.nomagic.uml2.ext.jmi.reflect.AbstractRefFeaturedImpl implements javax.jmi.reflect.RefClass
Provides the metaobject description of a class proxy object, and a range of operations for accessing and updating an object's classifier scoped features.
-
-
Constructor Summary
Constructors Constructor Description AbstractRefClass(AbstractRepository repository)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addInstance(javax.jmi.reflect.RefBaseObject instance)
protected void
checkCreate()
void
commitCreate(javax.jmi.reflect.RefObject instance)
Method is called to fire event that object is create and do additional initialization for created instancejava.util.Collection<java.lang.String>
getDerivedFeatures()
abstract org.eclipse.emf.ecore.EClass
getEClass()
ReturnsEClass
that is related with concrete class proxy.Expression
getExpression(java.lang.String featureName)
Returns expression by specified feature name.java.util.Collection<java.lang.String>
getRedefinedFeatures()
abstract java.util.Map<java.lang.String,java.lang.String>
getRedefinedFeaturesMap()
Map originalPropertyClass.originalPropertyName : redefinedPropertyNameValueSetter
getValueSetter(java.lang.String featureName)
Returns value setter by specified feature name.java.util.Collection
refAllOfClass()
The "refAllOfClass" operation returns the set of all instances in the current extent whose type is given by this object's class (instances of sub classes are not included).java.util.Collection
refAllOfType()
The "refAllOfType" operation returns the set of all instances in the current extent whose type is given by this object's class or one of its sub-classes.javax.jmi.reflect.RefObject
refCreateInstance(java.util.List args)
This "refCreateInstance" operation creates a new instance of the class for the class proxy's most derived interface.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 args)
javax.jmi.reflect.RefEnum
refGetEnum(java.lang.String enumName, java.lang.String args)
The refGetEnum operation returns an 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)
void
removeInstance(javax.jmi.reflect.RefBaseObject instance)
void
setExpression(java.lang.String featureName, Expression expression)
Sets expression by specified feature name.void
setValueSetter(java.lang.String featureName, ValueSetter setter)
Sets value setter by specified feature name.-
Methods inherited from class com.nomagic.uml2.ext.jmi.reflect.AbstractRefFeaturedImpl
get, getDynamicMetaObject, getFeature, isClassScopeFeature, isSet, isSet, refGetValue, refGetValue, refInvokeOperation, refInvokeOperation, refSetValue, refSetValue, set, setDynamicMetaObject, unSet
-
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 com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObject
getRepository, mof_getRepository, setMofID, setOwner, setRepository
-
Methods inherited from interface com.nomagic.uml2.ext.jmi.MapOwner
mapClear, mapPut, mapPutAll, mapRemove
-
-
-
-
Constructor Detail
-
AbstractRefClass
public AbstractRefClass(AbstractRepository repository)
- Parameters:
repository
-
-
-
Method Detail
-
refAllOfClass
public final java.util.Collection refAllOfClass()
The "refAllOfClass" operation returns the set of all instances in the current extent whose type is given by this object's class (instances of sub classes are not included).- Specified by:
refAllOfClass
in interfacejavax.jmi.reflect.RefClass
-
getEClass
public abstract org.eclipse.emf.ecore.EClass getEClass()
ReturnsEClass
that is related with concrete class proxy.- Returns:
EClass
object.
-
refAllOfType
public java.util.Collection refAllOfType()
The "refAllOfType" operation returns the set of all instances in the current extent whose type is given by this object's class or one of its sub-classes.- Specified by:
refAllOfType
in interfacejavax.jmi.reflect.RefClass
-
refCreateStruct
public javax.jmi.reflect.RefStruct refCreateStruct(javax.jmi.reflect.RefObject structType, java.util.List args)
- Specified by:
refCreateStruct
in interfacejavax.jmi.reflect.RefClass
-
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 the section titled Generation Rules for Parameters on page 56. InvalidCallException is raised if the structType parameter does not designate a valid struct type. InvalidNameException is raised when the structName does not denote a valid struct name. The 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 interfacejavax.jmi.reflect.RefClass
-
refGetEnum
public javax.jmi.reflect.RefEnum refGetEnum(javax.jmi.reflect.RefObject enumType, java.lang.String args)
- Specified by:
refGetEnum
in interfacejavax.jmi.reflect.RefClass
-
refGetEnum
public javax.jmi.reflect.RefEnum refGetEnum(java.lang.String enumName, java.lang.String args)
The refGetEnum operation returns an 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 metamobject 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 enumeration 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 interfacejavax.jmi.reflect.RefClass
-
checkCreate
protected void checkCreate()
-
commitCreate
public void commitCreate(javax.jmi.reflect.RefObject instance)
Method is called to fire event that object is create and do additional initialization for created instance- Parameters:
instance
- created instance
-
addInstance
public void addInstance(javax.jmi.reflect.RefBaseObject instance)
- Parameters:
instance
-
-
removeInstance
public void removeInstance(javax.jmi.reflect.RefBaseObject instance)
-
refCreateInstance
public javax.jmi.reflect.RefObject refCreateInstance(@CheckForNull java.util.List args)
This "refCreateInstance" operation creates a new instance of the class for the class proxy's most derived interface. The "args" list gives the initial values for the new instance object's instance scoped, non-derived attributes. The value of the "args" parameter must be either null, or a list such that: 1 - the list of arguments correspond 1-to-1 to the parameters for the specific create operation; and 2 - each argument must be encoded as per the section "Generation Rules for Parameters" on page 56. If "args" is null, then the operation corresponds to the default constructor that takes no arguments.- Specified by:
refCreateInstance
in interfacejavax.jmi.reflect.RefClass
-
getDerivedFeatures
public java.util.Collection<java.lang.String> getDerivedFeatures()
-
getRedefinedFeatures
public java.util.Collection<java.lang.String> getRedefinedFeatures()
-
getRedefinedFeaturesMap
public abstract java.util.Map<java.lang.String,java.lang.String> getRedefinedFeaturesMap()
Map originalPropertyClass.originalPropertyName : redefinedPropertyName- Returns:
-
setExpression
public void setExpression(java.lang.String featureName, Expression expression)
Description copied from interface:DerivedPropertyOwner
Sets expression by specified feature name.- Specified by:
setExpression
in interfaceAbstractRefFeatured
- Specified by:
setExpression
in interfaceDerivedPropertyOwner
- Overrides:
setExpression
in classcom.nomagic.uml2.ext.jmi.reflect.AbstractRefFeaturedImpl
- Parameters:
featureName
- name of a feature.expression
- an expression.
-
setValueSetter
public void setValueSetter(java.lang.String featureName, ValueSetter setter)
Description copied from interface:DerivedPropertyOwner
Sets value setter by specified feature name.- Specified by:
setValueSetter
in interfaceAbstractRefFeatured
- Specified by:
setValueSetter
in interfaceDerivedPropertyOwner
- Overrides:
setValueSetter
in classcom.nomagic.uml2.ext.jmi.reflect.AbstractRefFeaturedImpl
- Parameters:
featureName
- name of a feature.setter
- value setter.
-
getExpression
public Expression getExpression(java.lang.String featureName)
Description copied from interface:DerivedPropertyOwner
Returns expression by specified feature name.- Specified by:
getExpression
in interfaceAbstractRefFeatured
- Specified by:
getExpression
in interfaceDerivedPropertyOwner
- Overrides:
getExpression
in classcom.nomagic.uml2.ext.jmi.reflect.AbstractRefFeaturedImpl
- Parameters:
featureName
- name of a feature.- Returns:
- expression.
-
getValueSetter
public ValueSetter getValueSetter(java.lang.String featureName)
Description copied from interface:DerivedPropertyOwner
Returns value setter by specified feature name.- Specified by:
getValueSetter
in interfaceAbstractRefFeatured
- Specified by:
getValueSetter
in interfaceDerivedPropertyOwner
- Overrides:
getValueSetter
in classcom.nomagic.uml2.ext.jmi.reflect.AbstractRefFeaturedImpl
- Parameters:
featureName
- name of a feature.- Returns:
- value setter.
-
-