Package gw.internal.gosu.parser
Class GosuVarPropertyInfo
java.lang.Object
gw.lang.reflect.BaseFeatureInfo
gw.internal.gosu.parser.GosuBaseAttributedFeatureInfo
gw.internal.gosu.parser.GosuVarPropertyInfo
- All Implemented Interfaces:
IGosuVarPropertyInfo,IAnnotatedFeatureInfo,IAttributedFeatureInfo,IFeatureInfo,IGenericMethodInfo,IIntrinsicTypeReference,IPropertyInfo,ICompileTimeConstantValue
public class GosuVarPropertyInfo
extends GosuBaseAttributedFeatureInfo
implements IGosuVarPropertyInfo
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface gw.lang.reflect.IAnnotatedFeatureInfo
IAnnotatedFeatureInfo.IAnnotationInfoHelperNested classes/interfaces inherited from interface gw.lang.reflect.IAttributedFeatureInfo
IAttributedFeatureInfo.MODIFIER -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IPropertyAccessorprivate ITypeprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate Stringprivate IGosuClassprivate booleanprivate intprivate booleanprivate booleanprivate intprivate Stringprivate Stringprivate Stringprivate ITypeFields inherited from class gw.internal.gosu.parser.GosuBaseAttributedFeatureInfo
_declaredAnnotationsFields inherited from interface gw.lang.reflect.IAnnotatedFeatureInfo
ANNOTATION_HELPER -
Constructor Summary
ConstructorsConstructorDescriptionGosuVarPropertyInfo(GosuClassTypeInfo container, GosuVarPropertyInfo pi) GosuVarPropertyInfo(IFeatureInfo container, IVarStatement varStmt) -
Method Summary
Modifier and TypeMethodDescriptionassignActualType(IType type) voidassignSymbolType(IType type) private ExpressionA full description of this feature.The type of this feature e.g., for a property this is the property's type.protected List<IGosuAnnotation>getName()Gets the programmatic name or identifier of this feature.intIType[]getParameterizedParameterTypes(IType... typeParams) IType[]getParameterizedParameterTypes2(IType ownersType, IType... typeParams) getParameterizedReturnType(IType... typeParams) booleaninferTypeParametersFromArgumentTypes(IType... argTypes) inferTypeParametersFromArgumentTypes2(IType owningParameterizedType, IType... argTypes) booleanbooleanisFinal()booleanTrue if this feature is internal.booleanTrue if this feature is private.booleanTrue if this feature is protected.booleanisPublic()True if this feature is public.booleanbooleanbooleanbooleanisStatic()True if this feature is static, meaning the feature is not specific to a particular instance of the feature's containing type.booleanbooleanisWritable(IType whosAskin) Methods inherited from class gw.internal.gosu.parser.GosuBaseAttributedFeatureInfo
getActualTypeInContainer, getDeclaredAnnotations, getDeprecatedReason, getOwnersType, isDeprecated, isHidden, isVisibleMethods inherited from class gw.lang.reflect.BaseFeatureInfo
getAnnotation, getAnnotations, getAnnotationsOfType, getContainer, getDisplayName, getParamTypes, getSuperAnnotatedElements, hasAnnotation, hasDeclaredAnnotation, isAbstract, isDefaultImpl, isInternalAPI, isScriptable, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gw.lang.reflect.IAnnotatedFeatureInfo
getAnnotation, getAnnotations, getAnnotationsOfType, getDeclaredAnnotations, getDeprecatedReason, hasAnnotation, hasDeclaredAnnotation, isDefaultImpl, isDeprecatedMethods inherited from interface gw.lang.reflect.IAttributedFeatureInfo
isAbstract, isHidden, isScriptable, isVisibleMethods inherited from interface gw.lang.reflect.IFeatureInfo
getContainer, getDisplayName, getLocationInfo, getOwnersTypeMethods inherited from interface gw.lang.reflect.IIntrinsicTypeReference
getAssignableFeatureTypeMethods inherited from interface gw.lang.reflect.IPropertyInfo
isReadable
-
Field Details
-
_strIdentifer
-
_actualType
-
_bStatic
private boolean _bStatic -
_bPublic
private boolean _bPublic -
_bProtected
private boolean _bProtected -
_bInternal
private boolean _bInternal -
_bPrivate
private boolean _bPrivate -
_iOffset
private int _iOffset -
_accessor
-
_fullDescription
-
_hasProperty
private boolean _hasProperty -
_isScopedField
private boolean _isScopedField -
_gosuClass
-
_isFinal
private boolean _isFinal -
_symbolType
-
_symbolScopeString
-
_symbolAttributeName
-
_modifiers
private int _modifiers
-
-
Constructor Details
-
GosuVarPropertyInfo
GosuVarPropertyInfo(IFeatureInfo container, IVarStatement varStmt) -
GosuVarPropertyInfo
-
-
Method Details
-
getName
Description copied from interface:IFeatureInfoGets the programmatic name or identifier of this feature. Note this name should follow Java identifier naming conventions (alpha-num and underscores, but can't start with a digit).- Specified by:
getNamein interfaceIFeatureInfo
-
getFeatureType
Description copied from interface:IIntrinsicTypeReferenceThe type of this feature e.g., for a property this is the property's type.- Specified by:
getFeatureTypein interfaceIIntrinsicTypeReference
-
isStatic
public boolean isStatic()Description copied from interface:IAttributedFeatureInfoTrue if this feature is static, meaning the feature is not specific to a particular instance of the feature's containing type.- Specified by:
isStaticin interfaceIAttributedFeatureInfo
-
isPrivate
public boolean isPrivate()Description copied from interface:IAttributedFeatureInfoTrue if this feature is private. Private features are only accessible from within the type that owns them.- Specified by:
isPrivatein interfaceIAttributedFeatureInfo- Overrides:
isPrivatein classBaseFeatureInfo
-
isInternal
public boolean isInternal()Description copied from interface:IAttributedFeatureInfoTrue if this feature is internal. Internal features are accessible from within the type that owns them and from other types in the same namespace.- Specified by:
isInternalin interfaceIAttributedFeatureInfo- Overrides:
isInternalin classBaseFeatureInfo
-
isProtected
public boolean isProtected()Description copied from interface:IAttributedFeatureInfoTrue if this feature is protected. Protected features are accessible from within the type that owns them and from derived containers.- Specified by:
isProtectedin interfaceIAttributedFeatureInfo- Overrides:
isProtectedin classBaseFeatureInfo
-
isFinal
public boolean isFinal()- Specified by:
isFinalin interfaceIAttributedFeatureInfo- Overrides:
isFinalin classBaseFeatureInfo
-
isReified
public boolean isReified()- Specified by:
isReifiedin interfaceIAttributedFeatureInfo- Overrides:
isReifiedin classBaseFeatureInfo
-
isPublic
public boolean isPublic()Description copied from interface:IAttributedFeatureInfoTrue if this feature is public. Public features are not restricted.- Specified by:
isPublicin interfaceIAttributedFeatureInfo- Overrides:
isPublicin classBaseFeatureInfo
-
getGosuAnnotations
- Specified by:
getGosuAnnotationsin classGosuBaseAttributedFeatureInfo
-
isReadable
public boolean isReadable()- Specified by:
isReadablein interfaceIPropertyInfo- Returns:
- true if the property is readable given the visibility constraint passed in, false otherwise.
-
isWritable
- Specified by:
isWritablein interfaceIPropertyInfo- Parameters:
whosAskin- The type querying the property writability. For example, passing in the type the property is on will allow properties that have private access in the setter to be written to. Passing in an unrelated type will only allow properties that are to be written to.- Returns:
- True if the property is writable given the visibility constraint passed in, false otherwise.
-
isWritable
public boolean isWritable()- Specified by:
isWritablein interfaceIPropertyInfo- Returns:
- True if the property is writable given the visibility constraint passed in, false otherwise.
-
getOffset
public int getOffset()- Specified by:
getOffsetin interfaceIGosuVarPropertyInfo
-
getAccessor
- Specified by:
getAccessorin interfaceIPropertyInfo- Returns:
- the PropertyAccessor (for getting and setting) this property.
-
getPresentationInfo
- Specified by:
getPresentationInfoin interfaceIPropertyInfo
-
assignActualType
- Specified by:
assignActualTypein interfaceIGosuVarPropertyInfo
-
assignSymbolType
- Specified by:
assignSymbolTypein interfaceIGosuVarPropertyInfo
-
hasDeclaredProperty
public boolean hasDeclaredProperty()- Specified by:
hasDeclaredPropertyin interfaceIGosuVarPropertyInfo
-
isScopedField
public boolean isScopedField()- Specified by:
isScopedFieldin interfaceIGosuVarPropertyInfo
-
getScopedSymbolType
- Specified by:
getScopedSymbolTypein interfaceIGosuVarPropertyInfo
-
getSymbolScopeString
- Specified by:
getSymbolScopeStringin interfaceIGosuVarPropertyInfo
-
getSymbolAttributeName
- Specified by:
getSymbolAttributeNamein interfaceIGosuVarPropertyInfo
-
getTypeVariables
- Specified by:
getTypeVariablesin interfaceIGenericMethodInfo- Returns:
- An array of generic type variables if this feature corresponds with a generic type.
-
getParameterizedReturnType
- Specified by:
getParameterizedReturnTypein interfaceIGenericMethodInfo
-
getParameterizedParameterTypes
- Specified by:
getParameterizedParameterTypesin interfaceIGenericMethodInfo
-
getParameterizedParameterTypes2
- Specified by:
getParameterizedParameterTypes2in interfaceIGenericMethodInfo
-
inferTypeParametersFromArgumentTypes
- Specified by:
inferTypeParametersFromArgumentTypesin interfaceIGenericMethodInfo- Parameters:
argTypes- The argument types from a generic method call.- Returns:
- A map of inferred type parameters based on the argTypes. The map
contains only the types that could be inferred -- the map may be empty.
E.g.,
given generic method:
T[] toArray( T[] ) and call: list.toArray( new String[list.size()] ); => the toArray() method call should be automatically parameterized with based on the new String[0].
-
inferTypeParametersFromArgumentTypes2
public TypeVarToTypeMap inferTypeParametersFromArgumentTypes2(IType owningParameterizedType, IType... argTypes) - Specified by:
inferTypeParametersFromArgumentTypes2in interfaceIGenericMethodInfo
-
isCompileTimeConstantValue
public boolean isCompileTimeConstantValue()- Specified by:
isCompileTimeConstantValuein interfaceICompileTimeConstantValue
-
doCompileTimeEvaluation
- Specified by:
doCompileTimeEvaluationin interfaceICompileTimeConstantValue
-
getCompileTimeConstantExpression
-
getDescription
Description copied from interface:IFeatureInfoA full description of this feature.- Specified by:
getDescriptionin interfaceIFeatureInfo- Overrides:
getDescriptionin classBaseFeatureInfo
-