Package gw.internal.gosu.parser
Class ConstructorJavaClassConstructor
- java.lang.Object
-
- gw.internal.gosu.parser.ConstructorJavaClassConstructor
-
- All Implemented Interfaces:
IJavaAnnotatedElement,IJavaClassBytecodeConstructor,IJavaClassConstructor,java.io.Serializable
public class ConstructorJavaClassConstructor extends java.lang.Object implements IJavaClassConstructor, IJavaClassBytecodeConstructor
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConstructorJavaClassConstructor(java.lang.reflect.Constructor ctor, IModule module)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IParameterInfo[]convertGenericParameterTypes(IFeatureInfo container, TypeVarToTypeMap actualParamByVarName)IAnnotationInfogetAnnotation(java.lang.Class annotationClass)Returns this element's annotation for the specified type if such an annotation is present, else null.IAnnotationInfo[]getDeclaredAnnotations()Returns all annotations that are directly present on this element.java.lang.ClassgetDeclaringJavaClass()IJavaClassInfogetEnclosingClass()IJavaClassInfo[]getExceptionTypes()private IJavaClassType[]getGenericParameterTypes()java.lang.reflect.ConstructorgetJavaConstructor()java.lang.Class[]getJavaParameterTypes()intgetModifiers()java.util.List<Parameter>getParameterInfos()IJavaClassInfo[]getParameterTypes()booleanisAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)Returns true if an annotation for the specified type is present on this element, else false.booleanisDefault()private booleanisNonstaticInnerClass()booleanisSynthetic()java.lang.ObjectnewInstance(java.lang.Object[] objects)voidsetAccessible(boolean accessible)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gw.lang.reflect.java.IJavaAnnotatedElement
getLocationInfo
-
-
-
-
Field Detail
-
_ctor
private java.lang.reflect.Constructor _ctor
-
_module
private IModule _module
-
-
Constructor Detail
-
ConstructorJavaClassConstructor
public ConstructorJavaClassConstructor(java.lang.reflect.Constructor ctor, IModule module)
-
-
Method Detail
-
setAccessible
public void setAccessible(boolean accessible)
-
getDeclaringJavaClass
public java.lang.Class getDeclaringJavaClass()
-
getExceptionTypes
public IJavaClassInfo[] getExceptionTypes()
- Specified by:
getExceptionTypesin interfaceIJavaClassConstructor
-
getParameterInfos
public java.util.List<Parameter> getParameterInfos()
- Specified by:
getParameterInfosin interfaceIJavaClassConstructor
-
getModifiers
public int getModifiers()
- Specified by:
getModifiersin interfaceIJavaClassConstructor
-
isSynthetic
public boolean isSynthetic()
- Specified by:
isSyntheticin interfaceIJavaClassBytecodeConstructor
-
convertGenericParameterTypes
public IParameterInfo[] convertGenericParameterTypes(IFeatureInfo container, TypeVarToTypeMap actualParamByVarName)
- Specified by:
convertGenericParameterTypesin interfaceIJavaClassConstructor
-
getGenericParameterTypes
private IJavaClassType[] getGenericParameterTypes()
-
isNonstaticInnerClass
private boolean isNonstaticInnerClass()
-
getParameterTypes
public IJavaClassInfo[] getParameterTypes()
- Specified by:
getParameterTypesin interfaceIJavaClassConstructor
-
getJavaParameterTypes
public java.lang.Class[] getJavaParameterTypes()
-
newInstance
public java.lang.Object newInstance(java.lang.Object[] objects) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException, java.lang.InstantiationException- Specified by:
newInstancein interfaceIJavaClassConstructor- Throws:
java.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
isDefault
public boolean isDefault()
- Specified by:
isDefaultin interfaceIJavaClassConstructor
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Description copied from interface:IJavaAnnotatedElementReturns true if an annotation for the specified type is present on this element, else false. This method is designed primarily for convenient access to marker annotations.- Specified by:
isAnnotationPresentin interfaceIJavaAnnotatedElement- Parameters:
annotationClass- the Class object corresponding to the annotation type- Returns:
- true if an annotation for the specified annotation type is present on this element, else false
-
getAnnotation
public IAnnotationInfo getAnnotation(java.lang.Class annotationClass)
Description copied from interface:IJavaAnnotatedElementReturns this element's annotation for the specified type if such an annotation is present, else null.- Specified by:
getAnnotationin interfaceIJavaAnnotatedElement- Parameters:
annotationClass- the Class object corresponding to the annotation type- Returns:
- this element's annotation for the specified annotation type if present on this element, else null
-
getDeclaredAnnotations
public IAnnotationInfo[] getDeclaredAnnotations()
Description copied from interface:IJavaAnnotatedElementReturns all annotations that are directly present on this element. Unlike the other methods in this interface, this method ignores inherited annotations. (Returns an array of length zero if no annotations are directly present on this element.) The caller of this method is free to modify the returned array; it will have no effect on the arrays returned to other callers.- Specified by:
getDeclaredAnnotationsin interfaceIJavaAnnotatedElement- Returns:
- All annotations directly present on this element
-
getJavaConstructor
public java.lang.reflect.Constructor getJavaConstructor()
-
getEnclosingClass
public IJavaClassInfo getEnclosingClass()
- Specified by:
getEnclosingClassin interfaceIJavaAnnotatedElement
-
-