Package gw.internal.gosu.parser
Class JavaFieldPropertyInfo
- java.lang.Object
-
- gw.lang.reflect.BaseFeatureInfo
-
- gw.internal.gosu.parser.JavaBaseFeatureInfo
-
- gw.internal.gosu.parser.JavaFieldPropertyInfo
-
- All Implemented Interfaces:
IAnnotatedFeatureInfo,IAttributedFeatureInfo,IFeatureInfo,IIntrinsicTypeReference,IPropertyInfo,ICompileTimeConstantValue,IJavaBasePropertyInfo,IJavaFieldPropertyInfo
public class JavaFieldPropertyInfo extends JavaBaseFeatureInfo implements IJavaFieldPropertyInfo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classJavaFieldPropertyInfo.NonStaticAccessorprivate classJavaFieldPropertyInfo.StaticAccessor-
Nested classes/interfaces inherited from interface gw.lang.reflect.IAnnotatedFeatureInfo
IAnnotatedFeatureInfo.IAnnotationInfoHelper
-
Nested classes/interfaces inherited from interface gw.lang.reflect.IAttributedFeatureInfo
IAttributedFeatureInfo.MODIFIER
-
-
Field Summary
Fields Modifier and Type Field Description private IPropertyAccessor_accessorprivate IDocRef<IVarNode>_docsprivate IJavaClassField_fieldprivate boolean_isStaticprivate java.lang.String_strNameprivate IType_type-
Fields inherited from interface gw.lang.reflect.IAnnotatedFeatureInfo
ANNOTATION_HELPER
-
-
Constructor Summary
Constructors Constructor Description JavaFieldPropertyInfo(IFeatureInfo container, IType type, IJavaClassField field, boolean isStatic, boolean simplePropertyProcessing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidchangeNameForNonStaticCollision()java.lang.ObjectdoCompileTimeEvaluation()IPropertyAccessorgetAccessor()protected IJavaAnnotatedElementgetAnnotatedElement()java.util.List<IAnnotationInfo>getDeclaredAnnotations()java.lang.StringgetDeprecatedReason()java.lang.StringgetDescription()A full description of this feature.ITypegetFeatureType()The type of this feature e.g., for a property this is the property's type.IJavaClassFieldgetField()ILocationInfogetLocationInfo()java.lang.StringgetName()Gets the programmatic name or identifier of this feature.IPresentationInfogetPresentationInfo()java.lang.StringgetReturnDescription()private IDocRef<IVarNode>getVarDocs()private booleanisCompileTimeConstant()booleanisCompileTimeConstantValue()protected booleanisDefaultEnumFeature()booleanisDeprecated()protected booleanisHiddenViaFeatureDescriptor()booleanisInternal()True if this feature is internal.booleanisPrivate()True if this feature is private.booleanisProtected()True if this feature is protected.booleanisPublic()True if this feature is public.booleanisReadable()booleanisStatic()True if this feature is static, meaning the feature is not specific to a particular instance of the feature's containing type.protected booleanisVisibleViaFeatureDescriptor(IScriptabilityModifier constraint)booleanisWritable()booleanisWritable(IType whosAskin)java.lang.StringtoString()-
Methods inherited from class gw.internal.gosu.parser.JavaBaseFeatureInfo
isHidden, isVisible, makeDeprecated
-
Methods inherited from class gw.lang.reflect.BaseFeatureInfo
getAnnotation, getAnnotations, getAnnotationsOfType, getContainer, getDisplayName, getOwnersType, getParamTypes, getSuperAnnotatedElements, hasAnnotation, hasDeclaredAnnotation, isAbstract, isDefaultImpl, isFinal, isInternalAPI, isReified, isScriptable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gw.lang.reflect.IAnnotatedFeatureInfo
getAnnotation, getAnnotations, getAnnotationsOfType, hasAnnotation, hasDeclaredAnnotation, isDefaultImpl
-
Methods inherited from interface gw.lang.reflect.IAttributedFeatureInfo
isAbstract, isFinal, isHidden, isReified, isScriptable, isVisible
-
Methods inherited from interface gw.lang.reflect.IFeatureInfo
getContainer, getDisplayName, getOwnersType
-
Methods inherited from interface gw.lang.reflect.IIntrinsicTypeReference
getAssignableFeatureType
-
Methods inherited from interface gw.lang.reflect.IPropertyInfo
isReadable
-
-
-
-
Field Detail
-
_field
private IJavaClassField _field
-
_isStatic
private boolean _isStatic
-
_type
private IType _type
-
_accessor
private IPropertyAccessor _accessor
-
_strName
private java.lang.String _strName
-
-
Constructor Detail
-
JavaFieldPropertyInfo
JavaFieldPropertyInfo(IFeatureInfo container, IType type, IJavaClassField field, boolean isStatic, boolean simplePropertyProcessing)
-
-
Method Detail
-
getName
public java.lang.String 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
-
changeNameForNonStaticCollision
void changeNameForNonStaticCollision()
-
getFeatureType
public IType 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
-
isReadable
public boolean isReadable()
- Specified by:
isReadablein interfaceIPropertyInfo- Returns:
- true if the property is readable given the visibility constraint passed in, false otherwise.
-
isWritable
public boolean isWritable(IType whosAskin)
- 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.
-
isDeprecated
public boolean isDeprecated()
- Specified by:
isDeprecatedin interfaceIAnnotatedFeatureInfo- Overrides:
isDeprecatedin classBaseFeatureInfo- Returns:
- True if this feature is deprecated.
-
getDeprecatedReason
public java.lang.String getDeprecatedReason()
- Specified by:
getDeprecatedReasonin interfaceIAnnotatedFeatureInfo- Overrides:
getDeprecatedReasonin classBaseFeatureInfo- Returns:
- The deprecation message, or null if the feature is not deprecated.
-
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
-
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
-
getDescription
public java.lang.String getDescription()
Description copied from interface:IFeatureInfoA full description of this feature.- Specified by:
getDescriptionin interfaceIFeatureInfo- Overrides:
getDescriptionin classBaseFeatureInfo
-
getAccessor
public IPropertyAccessor getAccessor()
- Specified by:
getAccessorin interfaceIPropertyInfo- Returns:
- the PropertyAccessor (for getting and setting) this property.
-
getDeclaredAnnotations
public java.util.List<IAnnotationInfo> getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotationsin interfaceIAnnotatedFeatureInfo- Overrides:
getDeclaredAnnotationsin classJavaBaseFeatureInfo- Returns:
- A map of AnnotationInfo objects by type representing all the annotations associated with this feature, or an empty map if there are no annotations.
-
getPresentationInfo
public IPresentationInfo getPresentationInfo()
- Specified by:
getPresentationInfoin interfaceIPropertyInfo
-
getField
public IJavaClassField getField()
- Specified by:
getFieldin interfaceIJavaFieldPropertyInfo
-
toString
public java.lang.String toString()
- Overrides:
toStringin classBaseFeatureInfo
-
getAnnotatedElement
protected IJavaAnnotatedElement getAnnotatedElement()
- Specified by:
getAnnotatedElementin classJavaBaseFeatureInfo
-
isVisibleViaFeatureDescriptor
protected boolean isVisibleViaFeatureDescriptor(IScriptabilityModifier constraint)
- Specified by:
isVisibleViaFeatureDescriptorin classJavaBaseFeatureInfo
-
isHiddenViaFeatureDescriptor
protected boolean isHiddenViaFeatureDescriptor()
- Specified by:
isHiddenViaFeatureDescriptorin classJavaBaseFeatureInfo
-
isDefaultEnumFeature
protected boolean isDefaultEnumFeature()
- Specified by:
isDefaultEnumFeaturein classJavaBaseFeatureInfo
-
getReturnDescription
public java.lang.String getReturnDescription()
- Specified by:
getReturnDescriptionin interfaceIJavaBasePropertyInfo
-
isCompileTimeConstantValue
public boolean isCompileTimeConstantValue()
- Specified by:
isCompileTimeConstantValuein interfaceICompileTimeConstantValue
-
isCompileTimeConstant
private boolean isCompileTimeConstant()
-
doCompileTimeEvaluation
public java.lang.Object doCompileTimeEvaluation()
- Specified by:
doCompileTimeEvaluationin interfaceICompileTimeConstantValue
-
getLocationInfo
public ILocationInfo getLocationInfo()
- Specified by:
getLocationInfoin interfaceIFeatureInfo
-
-