Package gw.internal.gosu.parser
Class JavaConstructorInfo
- java.lang.Object
-
- gw.lang.reflect.BaseFeatureInfo
-
- gw.internal.gosu.parser.JavaBaseFeatureInfo
-
- gw.internal.gosu.parser.JavaConstructorInfo
-
- All Implemented Interfaces:
JavaHasParams
,IAnnotatedFeatureInfo
,IAttributedFeatureInfo
,IConstructorInfo
,IFeatureInfo
,IHasParameterInfos
,IOptionalParamCapable
,IJavaConstructorInfo
public class JavaConstructorInfo extends JavaBaseFeatureInfo implements IJavaConstructorInfo
-
-
Nested Class Summary
-
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 inherited from interface gw.lang.reflect.IAnnotatedFeatureInfo
ANNOTATION_HELPER
-
-
Constructor Summary
Constructors Constructor Description JavaConstructorInfo(IFeatureInfo container, IJavaClassConstructor ctor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IJavaAnnotatedElement
getAnnotatedElement()
IConstructorHandler
getConstructor()
List<IAnnotationInfo>
getDeclaredAnnotations()
IExpression[]
getDefaultValueExpressions()
String
getDescription()
A full description of this feature.String
getDisplayName()
Gets the display name of this feature.IDocRef<IParamNode>
getDocsForParam(int paramIndex)
List<IExceptionInfo>
getExceptions()
IJavaClassConstructor
getJavaConstructor()
ILocationInfo
getLocationInfo()
String
getName()
Gets the programmatic name or identifier of this feature.String[]
getParameterNames()
IParameterInfo[]
getParameters()
Constructor
getRawConstructor()
String
getShortDescription()
IType
getType()
boolean
hasRawConstructor(IConstructorInfo rawCtor)
boolean
isAbstract()
boolean
isDefault()
protected boolean
isDefaultEnumFeature()
boolean
isFinal()
protected boolean
isHiddenViaFeatureDescriptor()
boolean
isInternal()
True if this feature is internal.boolean
isPrivate()
True if this feature is private.boolean
isProtected()
True if this feature is protected.boolean
isPublic()
True if this feature is public.boolean
isStatic()
True if this feature is static, meaning the feature is not specific to a particular instance of the feature's containing type.boolean
isSynthetic()
protected boolean
isVisibleViaFeatureDescriptor(IScriptabilityModifier constraint)
-
Methods inherited from class gw.internal.gosu.parser.JavaBaseFeatureInfo
isHidden, isVisible, makeDeprecated
-
Methods inherited from class gw.lang.reflect.BaseFeatureInfo
getAnnotation, getAnnotations, getAnnotationsOfType, getContainer, getDeprecatedReason, getOwnersType, getParamTypes, getSuperAnnotatedElements, hasAnnotation, hasDeclaredAnnotation, isDefaultImpl, isDeprecated, isInternalAPI, isReified, isScriptable, toString
-
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, getDeprecatedReason, hasAnnotation, hasDeclaredAnnotation, isDefaultImpl, isDeprecated
-
Methods inherited from interface gw.lang.reflect.IAttributedFeatureInfo
isHidden, isReified, isScriptable, isVisible
-
Methods inherited from interface gw.lang.reflect.IFeatureInfo
getContainer, getOwnersType
-
-
-
-
Constructor Detail
-
JavaConstructorInfo
public JavaConstructorInfo(IFeatureInfo container, IJavaClassConstructor ctor)
- Parameters:
container
- Typically this will be the containing ITypeInfoctor
- The java ctor
-
-
Method Detail
-
getJavaConstructor
public IJavaClassConstructor getJavaConstructor()
- Specified by:
getJavaConstructor
in interfaceIJavaConstructorInfo
-
getRawConstructor
public Constructor getRawConstructor()
- Specified by:
getRawConstructor
in interfaceIJavaConstructorInfo
-
hasRawConstructor
public boolean hasRawConstructor(IConstructorInfo rawCtor)
- Specified by:
hasRawConstructor
in interfaceIConstructorInfo
-
isDefault
public boolean isDefault()
- Specified by:
isDefault
in interfaceIConstructorInfo
- Specified by:
isDefault
in interfaceIJavaConstructorInfo
-
getType
public IType getType()
- Specified by:
getType
in interfaceIConstructorInfo
-
getParameters
public IParameterInfo[] getParameters()
- Specified by:
getParameters
in interfaceIConstructorInfo
- Specified by:
getParameters
in interfaceIHasParameterInfos
-
getConstructor
public IConstructorHandler getConstructor()
- Specified by:
getConstructor
in interfaceIConstructorInfo
-
getDeclaredAnnotations
public List<IAnnotationInfo> getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfaceIAnnotatedFeatureInfo
- Overrides:
getDeclaredAnnotations
in 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.
-
getExceptions
public List<IExceptionInfo> getExceptions()
- Specified by:
getExceptions
in interfaceIConstructorInfo
-
getName
public String getName()
Description copied from interface:IFeatureInfo
Gets 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:
getName
in interfaceIFeatureInfo
-
getDisplayName
public String getDisplayName()
Description copied from interface:IFeatureInfo
Gets the display name of this feature. There is no guarantee this display name is localized.- Specified by:
getDisplayName
in interfaceIFeatureInfo
- Overrides:
getDisplayName
in classBaseFeatureInfo
-
getShortDescription
public String getShortDescription()
-
getDescription
public String getDescription()
Description copied from interface:IFeatureInfo
A full description of this feature.- Specified by:
getDescription
in interfaceIFeatureInfo
- Overrides:
getDescription
in classBaseFeatureInfo
-
isStatic
public boolean isStatic()
Description copied from interface:IAttributedFeatureInfo
True if this feature is static, meaning the feature is not specific to a particular instance of the feature's containing type.- Specified by:
isStatic
in interfaceIAttributedFeatureInfo
-
isPrivate
public boolean isPrivate()
Description copied from interface:IAttributedFeatureInfo
True if this feature is private. Private features are only accessible from within the type that owns them.- Specified by:
isPrivate
in interfaceIAttributedFeatureInfo
- Overrides:
isPrivate
in classBaseFeatureInfo
-
isInternal
public boolean isInternal()
Description copied from interface:IAttributedFeatureInfo
True 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:
isInternal
in interfaceIAttributedFeatureInfo
- Overrides:
isInternal
in classBaseFeatureInfo
-
isProtected
public boolean isProtected()
Description copied from interface:IAttributedFeatureInfo
True if this feature is protected. Protected features are accessible from within the type that owns them and from derived containers.- Specified by:
isProtected
in interfaceIAttributedFeatureInfo
- Overrides:
isProtected
in classBaseFeatureInfo
-
isPublic
public boolean isPublic()
Description copied from interface:IAttributedFeatureInfo
True if this feature is public. Public features are not restricted.- Specified by:
isPublic
in interfaceIAttributedFeatureInfo
- Overrides:
isPublic
in classBaseFeatureInfo
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interfaceIAttributedFeatureInfo
- Overrides:
isAbstract
in classBaseFeatureInfo
-
getDocsForParam
public IDocRef<IParamNode> getDocsForParam(int paramIndex)
- Specified by:
getDocsForParam
in interfaceJavaHasParams
-
isFinal
public boolean isFinal()
- Specified by:
isFinal
in interfaceIAttributedFeatureInfo
- Overrides:
isFinal
in classBaseFeatureInfo
-
isSynthetic
public boolean isSynthetic()
-
getDefaultValueExpressions
public IExpression[] getDefaultValueExpressions()
- Specified by:
getDefaultValueExpressions
in interfaceIOptionalParamCapable
- Returns:
- An array of objects representing the default values for a function's parameters. Returns an empty array if there are no default values, otherwise returns an array corresponding with default parameter values. If a parameter does not have a default value, it's default value is null in the array.
-
getParameterNames
public String[] getParameterNames()
- Specified by:
getParameterNames
in interfaceIOptionalParamCapable
-
getAnnotatedElement
protected IJavaAnnotatedElement getAnnotatedElement()
- Specified by:
getAnnotatedElement
in classJavaBaseFeatureInfo
-
isVisibleViaFeatureDescriptor
protected boolean isVisibleViaFeatureDescriptor(IScriptabilityModifier constraint)
- Specified by:
isVisibleViaFeatureDescriptor
in classJavaBaseFeatureInfo
-
isHiddenViaFeatureDescriptor
protected boolean isHiddenViaFeatureDescriptor()
- Specified by:
isHiddenViaFeatureDescriptor
in classJavaBaseFeatureInfo
-
isDefaultEnumFeature
protected boolean isDefaultEnumFeature()
- Specified by:
isDefaultEnumFeature
in classJavaBaseFeatureInfo
-
getLocationInfo
public ILocationInfo getLocationInfo()
- Specified by:
getLocationInfo
in interfaceIFeatureInfo
-
-