Package gw.lang.reflect
Class FeatureManager<T extends java.lang.CharSequence>
- java.lang.Object
-
- gw.lang.reflect.FeatureManager<T>
-
- Direct Known Subclasses:
GosuClassTypeInfo.MyFeatureManager,JavaTypeInfo.JavaFeatureManager
public class FeatureManager<T extends java.lang.CharSequence> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFeatureManager.InitState
-
Field Summary
Fields Modifier and Type Field Description private boolean_addObjectMethodsprivate boolean_caseSensitiveprivate java.util.List<IConstructorInfo>[]_constructorsprivate FeatureManager.InitState_ctorsInitializedprivate java.util.Map<IModule,MethodList[]>_methodsprivate java.util.Map<IModule,FeatureManager.InitState>_methodsInitializedprivate java.util.Map<IModule,PropertyNameMap<T>[]>_propertiesprivate java.util.Map<IModule,FeatureManager.InitState>_propertiesInitializedprivate java.lang.String_superPropertyPrefixprivate IType_supertypeToCopyPropertiesFromprivate IRelativeTypeInfo_typeInfo
-
Constructor Summary
Constructors Constructor Description FeatureManager(IRelativeTypeInfo typeInfo, boolean caseSensitive)FeatureManager(IRelativeTypeInfo typeInfo, boolean caseSensitive, boolean addObjectMethods)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddEnhancementMethods(java.util.List<IMethodInfo> privateMethods)protected voidaddEnhancementProperties(PropertyNameMap<T> privateProps, boolean caseSensitive)protected booleanareMethodParamsEqual(IType thisMethodParamType, IType superMethodParamType)private booleanargsEqual(IType[] parameters, IType[] parameters1)voidclear()private voidclearCtors()private voidclearMaps()private voidclearMethods(IModule module)private voidclearProperties(IModule module)private TconvertCharSequenceToCorrectSensitivity(java.lang.CharSequence propName)private PropertyNameMap<T>convertToMap(java.util.List<IPropertyInfo> features)protected ITypeconvertType(IType type)private java.util.ListfilterFeatures(java.util.List props, IRelativeTypeInfo.Accessibility accessibility)static IRelativeTypeInfo.AccessibilitygetAccessibilityForClass(IType ownersClass, IType whosAskin)IConstructorInfogetConstructor(IRelativeTypeInfo.Accessibility accessibility, IType[] params)java.util.List<? extends IConstructorInfo>getConstructors(IRelativeTypeInfo.Accessibility accessibility)IMethodInfogetMethod(IRelativeTypeInfo.Accessibility accessibility, java.lang.CharSequence methodName, IType... params)MethodListgetMethods(IRelativeTypeInfo.Accessibility accessibility)java.util.List<IPropertyInfo>getProperties(IRelativeTypeInfo.Accessibility accessibility)IPropertyInfogetProperty(IRelativeTypeInfo.Accessibility accessibility, java.lang.CharSequence propName)private ITypegetSuperType()private static java.lang.StringgetTopLevelEnclosingClassNamespace(IType type)private static java.lang.StringgetTopLevelTypeName(IType type)static booleanisFeatureAccessible(IAttributedFeatureInfo property, IRelativeTypeInfo.Accessibility accessibility)static booleanisInEnclosingClassHierarchy(IType ownersClass, IType whosAskin)protected static booleanisInEnhancedTypesHierarchy(IType ownersClass, IType whosAskin)protected static booleanisInHierarchy(IType ownersClass, IType whosAskin)static booleanisInSameNamespace(IType ownersClass, IType whosAskin)protected voidmaybeInitConstructors()protected voidmaybeInitMethods()protected voidmaybeInitProperties()protected voidmergeMethod(MethodList methods, IMethodInfo thisMethodInfo, boolean replace)protected voidmergeMethods(MethodList methods, IType type, boolean replace)protected voidmergeProperties(PropertyNameMap<T> props, IType type, boolean replace)protected voidmergeProperty(PropertyNameMap<T> props, IPropertyInfo propertyInfo, boolean replace)private IType[]removeGenericMethodParameters(IMethodInfo thisMethodInfo)voidsetSuperPropertyPrefix(java.lang.String superPropertyPrefix)voidsetSupertypeToCopyPropertiesFrom(IType supertypeToCopyPropertiesFrom)private booleanshouldReplace(PropertyNameMap<T> props, T cs, IPropertyInfo propertyInfo)java.lang.StringtoString()
-
-
-
Field Detail
-
_caseSensitive
private final boolean _caseSensitive
-
_addObjectMethods
private final boolean _addObjectMethods
-
_typeInfo
private IRelativeTypeInfo _typeInfo
-
_methodsInitialized
private volatile java.util.Map<IModule,FeatureManager.InitState> _methodsInitialized
-
_propertiesInitialized
private volatile java.util.Map<IModule,FeatureManager.InitState> _propertiesInitialized
-
_ctorsInitialized
private volatile FeatureManager.InitState _ctorsInitialized
-
_properties
private java.util.Map<IModule,PropertyNameMap<T extends java.lang.CharSequence>[]> _properties
-
_methods
private java.util.Map<IModule,MethodList[]> _methods
-
_constructors
private java.util.List<IConstructorInfo>[] _constructors
-
_superPropertyPrefix
private java.lang.String _superPropertyPrefix
-
_supertypeToCopyPropertiesFrom
private IType _supertypeToCopyPropertiesFrom
-
-
Constructor Detail
-
FeatureManager
public FeatureManager(IRelativeTypeInfo typeInfo, boolean caseSensitive)
-
FeatureManager
public FeatureManager(IRelativeTypeInfo typeInfo, boolean caseSensitive, boolean addObjectMethods)
-
-
Method Detail
-
getAccessibilityForClass
public static IRelativeTypeInfo.Accessibility getAccessibilityForClass(IType ownersClass, IType whosAskin)
-
getTopLevelEnclosingClassNamespace
private static java.lang.String getTopLevelEnclosingClassNamespace(IType type)
-
isInEnclosingClassHierarchy
public static boolean isInEnclosingClassHierarchy(IType ownersClass, IType whosAskin)
-
isInEnhancedTypesHierarchy
protected static boolean isInEnhancedTypesHierarchy(IType ownersClass, IType whosAskin)
-
getTopLevelTypeName
private static java.lang.String getTopLevelTypeName(IType type)
-
isFeatureAccessible
public static boolean isFeatureAccessible(IAttributedFeatureInfo property, IRelativeTypeInfo.Accessibility accessibility)
-
clear
public void clear()
-
clearMaps
private void clearMaps()
-
clearProperties
private void clearProperties(IModule module)
-
clearMethods
private void clearMethods(IModule module)
-
clearCtors
private void clearCtors()
-
getProperties
public java.util.List<IPropertyInfo> getProperties(IRelativeTypeInfo.Accessibility accessibility)
-
getProperty
public IPropertyInfo getProperty(IRelativeTypeInfo.Accessibility accessibility, java.lang.CharSequence propName)
-
convertCharSequenceToCorrectSensitivity
private T convertCharSequenceToCorrectSensitivity(java.lang.CharSequence propName)
-
getMethods
public MethodList getMethods(IRelativeTypeInfo.Accessibility accessibility)
-
getMethod
public IMethodInfo getMethod(IRelativeTypeInfo.Accessibility accessibility, java.lang.CharSequence methodName, IType... params)
-
getConstructors
public java.util.List<? extends IConstructorInfo> getConstructors(IRelativeTypeInfo.Accessibility accessibility)
-
getConstructor
public IConstructorInfo getConstructor(IRelativeTypeInfo.Accessibility accessibility, IType[] params)
-
maybeInitMethods
protected void maybeInitMethods()
-
maybeInitProperties
protected void maybeInitProperties()
-
getSuperType
private IType getSuperType()
-
maybeInitConstructors
protected void maybeInitConstructors()
-
addEnhancementMethods
protected void addEnhancementMethods(java.util.List<IMethodInfo> privateMethods)
-
addEnhancementProperties
protected void addEnhancementProperties(PropertyNameMap<T> privateProps, boolean caseSensitive)
-
setSuperPropertyPrefix
public void setSuperPropertyPrefix(java.lang.String superPropertyPrefix)
-
setSupertypeToCopyPropertiesFrom
public void setSupertypeToCopyPropertiesFrom(IType supertypeToCopyPropertiesFrom)
-
convertToMap
private PropertyNameMap<T> convertToMap(java.util.List<IPropertyInfo> features)
-
filterFeatures
private java.util.List filterFeatures(java.util.List props, IRelativeTypeInfo.Accessibility accessibility)
-
mergeProperties
protected void mergeProperties(PropertyNameMap<T> props, IType type, boolean replace)
-
mergeProperty
protected void mergeProperty(PropertyNameMap<T> props, IPropertyInfo propertyInfo, boolean replace)
-
shouldReplace
private boolean shouldReplace(PropertyNameMap<T> props, T cs, IPropertyInfo propertyInfo)
-
mergeMethods
protected void mergeMethods(MethodList methods, IType type, boolean replace)
-
mergeMethod
protected void mergeMethod(MethodList methods, IMethodInfo thisMethodInfo, boolean replace)
-
removeGenericMethodParameters
private IType[] removeGenericMethodParameters(IMethodInfo thisMethodInfo)
-
areMethodParamsEqual
protected boolean areMethodParamsEqual(IType thisMethodParamType, IType superMethodParamType)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-