Package com.nomagic.uml2.ext.jmi.reflect
Class ReflectionHelperCache
- java.lang.Object
-
- com.nomagic.uml2.ext.jmi.reflect.ReflectionHelperCache
-
public class ReflectionHelperCache extends java.lang.Object
All caches tied to the repository to avoid memory leaks
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean>
mBooleanFeatures
private java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.StructuralFeature>>
mCachedAttributesAndReferences
private java.util.Map<org.omg.mof.model.Class,java.util.Set<java.lang.String>>
mCachedAttributesAndReferencesAsString
private java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.MofAttribute>>
mCachedChangeableAttributes
private java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.StructuralFeature>>
mCachedChangeableAttributesAndReferences
private java.util.Map<org.omg.mof.model.Class,java.util.Set<java.lang.String>>
mCachedChangeableAttributesAndReferencesAsString
private java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Reference>>
mCachedComposedByReferences
private java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Reference>>
mCachedCompositeReferences
private ReflectionMultiKeyMap<AbstractRefClass,java.lang.Class,java.util.List<java.lang.String>>
mCachedCompositeRelationsPropertyNamesMultiple
private ReflectionMultiKeyMap<AbstractRefClass,java.lang.Class,java.util.List<java.lang.String>>
mCachedCompositeRelationsPropertyNamesSingle
private java.util.Map<java.lang.Class,java.util.List<java.lang.Class>>
mCachedContainersByClassType
private java.util.Map<org.omg.mof.model.Class,java.util.List<java.lang.Object>>
mCachedContents
private ReflectionMultiKeyMap<java.lang.Class,java.lang.String,org.omg.mof.model.StructuralFeature>
mCachedDerivedFeatures
private ReflectionMultiKeyMap<java.lang.Class,java.lang.String,HardCodedRule>
mCachedDerivedReferences
private java.util.Map<org.omg.mof.model.Reference,java.lang.Boolean>
mCachedDisposableReferences
private ReflectionMultiKeyMap<org.omg.mof.model.StructuralFeature,java.lang.String,javax.jmi.reflect.RefEnum>
mCachedEnums
private java.util.Map<java.lang.String,java.util.Map<java.lang.String,org.omg.mof.model.StructuralFeature>>
mCachedFeatures
private java.util.Map<java.lang.Class<? extends AbstractRefClass>,java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>>
mCachedFeatureSubsets
private java.util.Map<java.lang.Class<? extends AbstractRefClass>,java.util.Map<java.lang.String,java.util.List<java.lang.String>>>
mCachedFeatureSubsetsDeep
private ReflectionMultiKeyMap<org.omg.mof.model.Class,org.omg.mof.model.Class,java.lang.Boolean>
mCachedIsSuperType
private java.util.Map<org.omg.mof.model.GeneralizableElement,java.util.List<org.omg.mof.model.GeneralizableElement>>
mCachedMofSuperTypes
private java.util.Map<java.lang.Class,AbstractRefClass>
mCachedProxies
private java.util.Map<java.lang.String,java.util.List<org.omg.mof.model.Reference>>
mCachedReferences
private java.util.Map<java.lang.Class,java.util.List<java.lang.String>>
mCachedSubsetedFeatures
private java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Class>>
mCachedSuperTypes
private java.util.Map<org.omg.mof.model.Class,java.util.List<java.lang.String>>
mCompositeFeaturesNames
private java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean>
mEnumFeatures
private java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean>
mIntegerFeatures
private java.util.Map<java.lang.String,AbstractRefClass>
mMetaClassProxy
private java.util.Map<org.omg.mof.model.Class,AbstractRefClass>
mMofClassToProxy
private java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean>
mRealFeatures
private java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean>
mStringFeatures
-
Constructor Summary
Constructors Constructor Description ReflectionHelperCache()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the cachejava.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean>
getBooleanFeatures()
java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.StructuralFeature>>
getCachedAttributesAndReferences()
java.util.Map<org.omg.mof.model.Class,java.util.Set<java.lang.String>>
getCachedAttributesAndReferencesAsString()
java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.MofAttribute>>
getCachedChangeableAttributes()
java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.StructuralFeature>>
getCachedChangeableAttributesAndReferences()
java.util.Map<org.omg.mof.model.Class,java.util.Set<java.lang.String>>
getCachedChangeableAttributesAndReferencesAsString()
java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Reference>>
getCachedComposedByReferences()
java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Reference>>
getCachedCompositeReferences()
ReflectionMultiKeyMap<AbstractRefClass,java.lang.Class,java.util.List<java.lang.String>>
getCachedCompositeRelationsPropertyNames()
ReflectionMultiKeyMap<AbstractRefClass,java.lang.Class,java.util.List<java.lang.String>>
getCachedCompositeRelationsPropertyNamesOnlyMultiple()
java.util.Map<java.lang.Class,java.util.List<java.lang.Class>>
getCachedContainersByClassType()
java.util.Map<org.omg.mof.model.Class,java.util.List<java.lang.Object>>
getCachedContents()
ReflectionMultiKeyMap<java.lang.Class,java.lang.String,org.omg.mof.model.StructuralFeature>
getCachedDerivedFeatures()
ReflectionMultiKeyMap<java.lang.Class,java.lang.String,HardCodedRule>
getCachedDerivedReferences()
java.util.Map<org.omg.mof.model.Reference,java.lang.Boolean>
getCachedDisposableReferences()
java.util.Map<java.lang.String,java.util.Map<java.lang.String,org.omg.mof.model.StructuralFeature>>
getCachedFeatures()
java.util.Map<java.lang.Class<? extends AbstractRefClass>,java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>>
getCachedFeatureSubsets()
java.util.Map<java.lang.Class<? extends AbstractRefClass>,java.util.Map<java.lang.String,java.util.List<java.lang.String>>>
getCachedFeatureSubsetsDeep()
ReflectionMultiKeyMap<org.omg.mof.model.Class,org.omg.mof.model.Class,java.lang.Boolean>
getCachedIsSuperType()
java.util.Map<org.omg.mof.model.GeneralizableElement,java.util.List<org.omg.mof.model.GeneralizableElement>>
getCachedMofSuperTypes()
java.util.Map<java.lang.Class,AbstractRefClass>
getCachedProxies()
java.util.Map<java.lang.String,java.util.List<org.omg.mof.model.Reference>>
getCachedReferences()
java.util.Map<java.lang.Class,java.util.List<java.lang.String>>
getCachedSubsetedFeatures()
java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Class>>
getCachedSuperTypes()
java.util.Map<org.omg.mof.model.Class,java.util.List<java.lang.String>>
getCompositeFeaturesNames()
java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean>
getEnumFeatures()
ReflectionMultiKeyMap<org.omg.mof.model.StructuralFeature,java.lang.String,javax.jmi.reflect.RefEnum>
getEnums()
java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean>
getIntegerFeatures()
java.util.Map<java.lang.String,AbstractRefClass>
getMetaClassProxy()
java.util.Map<org.omg.mof.model.Class,AbstractRefClass>
getMofClassToProxy()
Map meta object to RefClass.java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean>
getRealFeatures()
java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean>
getStringFeatures()
private void
registerRule(java.lang.Class type, java.lang.String propertyName, HardCodedRule rule)
private void
registerRule(java.lang.Class type, java.lang.String propertyName, HardCodedRule rule, boolean strict)
private void
registerRules(java.lang.Class type, java.lang.String propertyName, HardCodedRule rule)
private static void
syncClear(ReflectionMultiKeyMap map)
private static void
syncClear(java.util.Map map)
-
-
-
Field Detail
-
mCachedSuperTypes
private final java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Class>> mCachedSuperTypes
-
mCachedIsSuperType
private final ReflectionMultiKeyMap<org.omg.mof.model.Class,org.omg.mof.model.Class,java.lang.Boolean> mCachedIsSuperType
-
mCachedContents
private final java.util.Map<org.omg.mof.model.Class,java.util.List<java.lang.Object>> mCachedContents
-
mCachedAttributesAndReferences
private final java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.StructuralFeature>> mCachedAttributesAndReferences
-
mCachedChangeableAttributesAndReferences
private final java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.StructuralFeature>> mCachedChangeableAttributesAndReferences
-
mCachedChangeableAttributes
private final java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.MofAttribute>> mCachedChangeableAttributes
-
mCachedCompositeReferences
private final java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Reference>> mCachedCompositeReferences
-
mCachedComposedByReferences
private final java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Reference>> mCachedComposedByReferences
-
mCompositeFeaturesNames
private final java.util.Map<org.omg.mof.model.Class,java.util.List<java.lang.String>> mCompositeFeaturesNames
-
mCachedFeatures
private final java.util.Map<java.lang.String,java.util.Map<java.lang.String,org.omg.mof.model.StructuralFeature>> mCachedFeatures
-
mCachedAttributesAndReferencesAsString
private final java.util.Map<org.omg.mof.model.Class,java.util.Set<java.lang.String>> mCachedAttributesAndReferencesAsString
-
mCachedChangeableAttributesAndReferencesAsString
private final java.util.Map<org.omg.mof.model.Class,java.util.Set<java.lang.String>> mCachedChangeableAttributesAndReferencesAsString
-
mMofClassToProxy
private final java.util.Map<org.omg.mof.model.Class,AbstractRefClass> mMofClassToProxy
-
mCachedFeatureSubsets
private final java.util.Map<java.lang.Class<? extends AbstractRefClass>,java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>> mCachedFeatureSubsets
-
mCachedSubsetedFeatures
private final java.util.Map<java.lang.Class,java.util.List<java.lang.String>> mCachedSubsetedFeatures
-
mCachedFeatureSubsetsDeep
private final java.util.Map<java.lang.Class<? extends AbstractRefClass>,java.util.Map<java.lang.String,java.util.List<java.lang.String>>> mCachedFeatureSubsetsDeep
-
mCachedProxies
private final java.util.Map<java.lang.Class,AbstractRefClass> mCachedProxies
-
mCachedContainersByClassType
private final java.util.Map<java.lang.Class,java.util.List<java.lang.Class>> mCachedContainersByClassType
-
mCachedReferences
private final java.util.Map<java.lang.String,java.util.List<org.omg.mof.model.Reference>> mCachedReferences
-
mMetaClassProxy
private final java.util.Map<java.lang.String,AbstractRefClass> mMetaClassProxy
-
mCachedMofSuperTypes
private final java.util.Map<org.omg.mof.model.GeneralizableElement,java.util.List<org.omg.mof.model.GeneralizableElement>> mCachedMofSuperTypes
-
mCachedDisposableReferences
private final java.util.Map<org.omg.mof.model.Reference,java.lang.Boolean> mCachedDisposableReferences
-
mCachedDerivedReferences
private ReflectionMultiKeyMap<java.lang.Class,java.lang.String,HardCodedRule> mCachedDerivedReferences
-
mCachedCompositeRelationsPropertyNamesSingle
private final ReflectionMultiKeyMap<AbstractRefClass,java.lang.Class,java.util.List<java.lang.String>> mCachedCompositeRelationsPropertyNamesSingle
-
mCachedCompositeRelationsPropertyNamesMultiple
private final ReflectionMultiKeyMap<AbstractRefClass,java.lang.Class,java.util.List<java.lang.String>> mCachedCompositeRelationsPropertyNamesMultiple
-
mCachedEnums
private final ReflectionMultiKeyMap<org.omg.mof.model.StructuralFeature,java.lang.String,javax.jmi.reflect.RefEnum> mCachedEnums
-
mBooleanFeatures
private final java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean> mBooleanFeatures
-
mIntegerFeatures
private final java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean> mIntegerFeatures
-
mRealFeatures
private final java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean> mRealFeatures
-
mStringFeatures
private final java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean> mStringFeatures
-
mEnumFeatures
private final java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean> mEnumFeatures
-
mCachedDerivedFeatures
private final ReflectionMultiKeyMap<java.lang.Class,java.lang.String,org.omg.mof.model.StructuralFeature> mCachedDerivedFeatures
-
-
Method Detail
-
registerRule
private void registerRule(java.lang.Class type, java.lang.String propertyName, HardCodedRule rule)
-
registerRule
private void registerRule(java.lang.Class type, java.lang.String propertyName, HardCodedRule rule, boolean strict)
-
registerRules
private void registerRules(java.lang.Class type, java.lang.String propertyName, HardCodedRule rule)
-
getCachedAttributesAndReferences
public java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.StructuralFeature>> getCachedAttributesAndReferences()
- Returns:
- Returns the CachedAttributesAndReferences.
-
getCachedChangeableAttributesAndReferences
public java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.StructuralFeature>> getCachedChangeableAttributesAndReferences()
- Returns:
- Returns the CachedChangeableAttributesAndReferences.
-
getCachedChangeableAttributes
public java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.MofAttribute>> getCachedChangeableAttributes()
-
getCachedComposedByReferences
public java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Reference>> getCachedComposedByReferences()
- Returns:
- Returns the CachedComposedByReferences.
-
getCachedCompositeReferences
public java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Reference>> getCachedCompositeReferences()
- Returns:
- Returns the CachedCompositeReferences.
-
getCachedFeatureSubsets
public java.util.Map<java.lang.Class<? extends AbstractRefClass>,java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>> getCachedFeatureSubsets()
- Returns:
- Returns the CachedFeatureSubsets.
-
getCachedFeatureSubsetsDeep
public java.util.Map<java.lang.Class<? extends AbstractRefClass>,java.util.Map<java.lang.String,java.util.List<java.lang.String>>> getCachedFeatureSubsetsDeep()
- Returns:
- Returns the CachedFeatureSubsetsDeep.
-
getCachedMofSuperTypes
public java.util.Map<org.omg.mof.model.GeneralizableElement,java.util.List<org.omg.mof.model.GeneralizableElement>> getCachedMofSuperTypes()
- Returns:
- Returns the CachedMofSuperTypes.
-
getCachedProxies
public java.util.Map<java.lang.Class,AbstractRefClass> getCachedProxies()
- Returns:
- Returns the CachedProxies.
-
getMofClassToProxy
public java.util.Map<org.omg.mof.model.Class,AbstractRefClass> getMofClassToProxy()
Map meta object to RefClass.
-
getCachedReferences
public java.util.Map<java.lang.String,java.util.List<org.omg.mof.model.Reference>> getCachedReferences()
- Returns:
- Returns the CachedReferences.
-
getCachedSubsetedFeatures
public java.util.Map<java.lang.Class,java.util.List<java.lang.String>> getCachedSubsetedFeatures()
- Returns:
- Returns the CachedSubsetedFeatures.
-
getCachedSuperTypes
public java.util.Map<org.omg.mof.model.Class,java.util.List<org.omg.mof.model.Class>> getCachedSuperTypes()
- Returns:
- Returns the cached superTypes.
-
getCachedIsSuperType
public ReflectionMultiKeyMap<org.omg.mof.model.Class,org.omg.mof.model.Class,java.lang.Boolean> getCachedIsSuperType()
-
getCachedContents
public java.util.Map<org.omg.mof.model.Class,java.util.List<java.lang.Object>> getCachedContents()
- Returns:
- Returns the cached contents.
-
getCachedContainersByClassType
public java.util.Map<java.lang.Class,java.util.List<java.lang.Class>> getCachedContainersByClassType()
- Returns:
- Returns the cachedContainersByClassType.
-
getCompositeFeaturesNames
public java.util.Map<org.omg.mof.model.Class,java.util.List<java.lang.String>> getCompositeFeaturesNames()
- Returns:
- Returns the compositeFeaturesNames.
-
getMetaClassProxy
public java.util.Map<java.lang.String,AbstractRefClass> getMetaClassProxy()
- Returns:
- Returns the metaClassProxy.
-
getCachedFeatures
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,org.omg.mof.model.StructuralFeature>> getCachedFeatures()
-
getCachedDerivedReferences
public ReflectionMultiKeyMap<java.lang.Class,java.lang.String,HardCodedRule> getCachedDerivedReferences()
-
getCachedDisposableReferences
public java.util.Map<org.omg.mof.model.Reference,java.lang.Boolean> getCachedDisposableReferences()
-
getEnums
public ReflectionMultiKeyMap<org.omg.mof.model.StructuralFeature,java.lang.String,javax.jmi.reflect.RefEnum> getEnums()
-
getCachedAttributesAndReferencesAsString
public java.util.Map<org.omg.mof.model.Class,java.util.Set<java.lang.String>> getCachedAttributesAndReferencesAsString()
-
getCachedChangeableAttributesAndReferencesAsString
public java.util.Map<org.omg.mof.model.Class,java.util.Set<java.lang.String>> getCachedChangeableAttributesAndReferencesAsString()
-
getCachedCompositeRelationsPropertyNames
public ReflectionMultiKeyMap<AbstractRefClass,java.lang.Class,java.util.List<java.lang.String>> getCachedCompositeRelationsPropertyNames()
-
getCachedDerivedFeatures
public ReflectionMultiKeyMap<java.lang.Class,java.lang.String,org.omg.mof.model.StructuralFeature> getCachedDerivedFeatures()
-
getCachedCompositeRelationsPropertyNamesOnlyMultiple
public ReflectionMultiKeyMap<AbstractRefClass,java.lang.Class,java.util.List<java.lang.String>> getCachedCompositeRelationsPropertyNamesOnlyMultiple()
-
getBooleanFeatures
public java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean> getBooleanFeatures()
-
getIntegerFeatures
public java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean> getIntegerFeatures()
-
getRealFeatures
public java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean> getRealFeatures()
-
getStringFeatures
public java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean> getStringFeatures()
-
getEnumFeatures
public java.util.Map<org.omg.mof.model.StructuralFeature,java.lang.Boolean> getEnumFeatures()
-
clear
public void clear()
Clear the cache
-
syncClear
private static void syncClear(java.util.Map map)
-
syncClear
private static void syncClear(ReflectionMultiKeyMap map)
-
-