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 Modifier and Type Class Description private classJavaConstructorInfo.ConstructorHandlerAdapter-
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 IJavaClassConstructor_ctorprivate IConstructorHandler_ctorHandlerprivate IDocRef<IConstructorNode>_docsprivate java.util.List<IExceptionInfo>_exceptionsprivate IParameterInfo[]_params-
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 IJavaAnnotatedElementgetAnnotatedElement()IConstructorHandlergetConstructor()private IDocRef<IConstructorNode>getConstructorDocs()java.util.List<IAnnotationInfo>getDeclaredAnnotations()IExpression[]getDefaultValueExpressions()java.lang.StringgetDescription()A full description of this feature.java.lang.StringgetDisplayName()Gets the display name of this feature.IDocRef<IParamNode>getDocsForParam(int paramIndex)java.util.List<IExceptionInfo>getExceptions()IJavaClassConstructorgetJavaConstructor()ILocationInfogetLocationInfo()java.lang.StringgetName()Gets the programmatic name or identifier of this feature.java.lang.String[]getParameterNames()IParameterInfo[]getParameters()java.lang.reflect.ConstructorgetRawConstructor()java.lang.StringgetShortDescription()ITypegetType()booleanhasRawConstructor(IConstructorInfo rawCtor)booleanisAbstract()booleanisDefault()protected booleanisDefaultEnumFeature()booleanisFinal()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.booleanisStatic()True if this feature is static, meaning the feature is not specific to a particular instance of the feature's containing type.booleanisSynthetic()private booleanisVarArgs()protected booleanisVisibleViaFeatureDescriptor(IScriptabilityModifier constraint)private java.lang.StringmakeSignature()-
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
-
-
-
-
Field Detail
-
_ctor
private IJavaClassConstructor _ctor
-
_params
private IParameterInfo[] _params
-
_ctorHandler
private IConstructorHandler _ctorHandler
-
_exceptions
private java.util.List<IExceptionInfo> _exceptions
-
_docs
private IDocRef<IConstructorNode> _docs
-
-
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:
getJavaConstructorin interfaceIJavaConstructorInfo
-
getRawConstructor
public java.lang.reflect.Constructor getRawConstructor()
- Specified by:
getRawConstructorin interfaceIJavaConstructorInfo
-
hasRawConstructor
public boolean hasRawConstructor(IConstructorInfo rawCtor)
- Specified by:
hasRawConstructorin interfaceIConstructorInfo
-
isDefault
public boolean isDefault()
- Specified by:
isDefaultin interfaceIConstructorInfo- Specified by:
isDefaultin interfaceIJavaConstructorInfo
-
getType
public IType getType()
- Specified by:
getTypein interfaceIConstructorInfo
-
getParameters
public IParameterInfo[] getParameters()
- Specified by:
getParametersin interfaceIConstructorInfo- Specified by:
getParametersin interfaceIHasParameterInfos
-
getConstructor
public IConstructorHandler getConstructor()
- Specified by:
getConstructorin interfaceIConstructorInfo
-
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.
-
getConstructorDocs
private IDocRef<IConstructorNode> getConstructorDocs()
-
getExceptions
public java.util.List<IExceptionInfo> getExceptions()
- Specified by:
getExceptionsin interfaceIConstructorInfo
-
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
-
makeSignature
private java.lang.String makeSignature()
-
getDisplayName
public java.lang.String getDisplayName()
Description copied from interface:IFeatureInfoGets the display name of this feature. There is no guarantee this display name is localized.- Specified by:
getDisplayNamein interfaceIFeatureInfo- Overrides:
getDisplayNamein classBaseFeatureInfo
-
getShortDescription
public java.lang.String getShortDescription()
-
getDescription
public java.lang.String getDescription()
Description copied from interface:IFeatureInfoA full description of this feature.- Specified by:
getDescriptionin interfaceIFeatureInfo- Overrides:
getDescriptionin classBaseFeatureInfo
-
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
-
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
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstractin interfaceIAttributedFeatureInfo- Overrides:
isAbstractin classBaseFeatureInfo
-
getDocsForParam
public IDocRef<IParamNode> getDocsForParam(int paramIndex)
- Specified by:
getDocsForParamin interfaceJavaHasParams
-
isFinal
public boolean isFinal()
- Specified by:
isFinalin interfaceIAttributedFeatureInfo- Overrides:
isFinalin classBaseFeatureInfo
-
isSynthetic
public boolean isSynthetic()
-
isVarArgs
private boolean isVarArgs()
-
getDefaultValueExpressions
public IExpression[] getDefaultValueExpressions()
- Specified by:
getDefaultValueExpressionsin 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 java.lang.String[] getParameterNames()
- Specified by:
getParameterNamesin interfaceIOptionalParamCapable
-
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
-
getLocationInfo
public ILocationInfo getLocationInfo()
- Specified by:
getLocationInfoin interfaceIFeatureInfo
-
-