Package com.strobel.reflection.emit
Class ConstructorBuilder
- java.lang.Object
-
- com.strobel.reflection.MemberInfo
-
- com.strobel.reflection.MethodBase
-
- com.strobel.reflection.ConstructorInfo
-
- com.strobel.reflection.emit.ConstructorBuilder
-
- All Implemented Interfaces:
java.lang.reflect.AnnotatedElement
public final class ConstructorBuilder extends ConstructorInfo
-
-
Field Summary
Fields Modifier and Type Field Description private MethodBuilder_methodBuilder(package private) ConstructorInfogeneratedConstructor(package private) booleanreturnCodeGenerator
-
Constructor Summary
Constructors Constructor Description ConstructorBuilder(int modifiers, TypeList parameterTypes, TypeList thrownTypes, TypeBuilder<?> declaringType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCustomAnnotation(AnnotationBuilder<? extends java.lang.annotation.Annotation> annotation)java.lang.StringBuilderappendErasedSignature(java.lang.StringBuilder sb)java.lang.StringBuilderappendSimpleDescription(java.lang.StringBuilder sb)voiddefineParameter(int position, java.lang.String name)<T extends java.lang.annotation.Annotation>
TgetAnnotation(java.lang.Class<T> annotationClass)java.lang.annotation.Annotation[]getAnnotations()CodeGeneratorgetCodeGenerator()ReadOnlyList<AnnotationBuilder<? extends java.lang.annotation.Annotation>>getCustomAnnotations()java.lang.annotation.Annotation[]getDeclaredAnnotations()TypeBuilder<?>getDeclaringType()java.util.List<ParameterBuilder>getDefinedParameters()MethodBuildergetMethodBuilder()intgetModifiers()ParameterListgetParameters()TypeListgetParameterTypes()java.lang.reflect.Constructor<?>getRawConstructor()Type<?>getReflectedType()SignatureTypegetSignatureType()booleanisAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)booleanisFinished()booleanisTypeCreated()voidsetParameterTypes(TypeList parameterTypes)private voidverifyTypeCreated()-
Methods inherited from class com.strobel.reflection.ConstructorInfo
appendBriefDescription, appendDescription, appendErasedDescription, appendSignature, containsGenericParameter, getMemberType, getName, invoke
-
Methods inherited from class com.strobel.reflection.MethodBase
getCallingConvention, getThrownTypes, isEquivalentTo
-
Methods inherited from class com.strobel.reflection.MemberInfo
appendGenericSignature, emptyAnnotations, equals, getAnnotationsByType, getBriefDescription, getDeclaredAnnotation, getDeclaredAnnotationsByType, getDescription, getErasedDescription, getErasedSignature, getSignature, getSimpleDescription, hashCode, invalidateCaches, isFinal, isNonPublic, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, toString
-
-
-
-
Field Detail
-
_methodBuilder
private final MethodBuilder _methodBuilder
-
returnCodeGenerator
boolean returnCodeGenerator
-
generatedConstructor
ConstructorInfo generatedConstructor
-
-
Constructor Detail
-
ConstructorBuilder
public ConstructorBuilder(int modifiers, TypeList parameterTypes, TypeList thrownTypes, TypeBuilder<?> declaringType)
-
-
Method Detail
-
verifyTypeCreated
private void verifyTypeCreated()
-
isFinished
public boolean isFinished()
-
isTypeCreated
public boolean isTypeCreated()
-
getMethodBuilder
public MethodBuilder getMethodBuilder()
-
getCodeGenerator
public CodeGenerator getCodeGenerator()
-
getRawConstructor
public java.lang.reflect.Constructor<?> getRawConstructor()
- Specified by:
getRawConstructorin classConstructorInfo
-
appendErasedSignature
public java.lang.StringBuilder appendErasedSignature(java.lang.StringBuilder sb)
- Overrides:
appendErasedSignaturein classConstructorInfo
-
appendSimpleDescription
public java.lang.StringBuilder appendSimpleDescription(java.lang.StringBuilder sb)
- Overrides:
appendSimpleDescriptionin classConstructorInfo
-
getDeclaringType
public TypeBuilder<?> getDeclaringType()
- Specified by:
getDeclaringTypein classMemberInfo
-
getModifiers
public int getModifiers()
- Specified by:
getModifiersin classMemberInfo
-
getSignatureType
public SignatureType getSignatureType()
- Specified by:
getSignatureTypein classMethodBase
-
getParameters
public ParameterList getParameters()
- Overrides:
getParametersin classMethodBase
-
getParameterTypes
public TypeList getParameterTypes()
-
setParameterTypes
public void setParameterTypes(TypeList parameterTypes)
-
getDefinedParameters
public java.util.List<ParameterBuilder> getDefinedParameters()
-
defineParameter
public void defineParameter(int position, java.lang.String name)
-
getReflectedType
public Type<?> getReflectedType()
- Overrides:
getReflectedTypein classMemberInfo
-
getAnnotation
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
- Specified by:
getAnnotationin interfacejava.lang.reflect.AnnotatedElement- Overrides:
getAnnotationin classConstructorInfo
-
getAnnotations
@NotNull public java.lang.annotation.Annotation[] getAnnotations()
- Specified by:
getAnnotationsin interfacejava.lang.reflect.AnnotatedElement- Overrides:
getAnnotationsin classConstructorInfo
-
getDeclaredAnnotations
@NotNull public java.lang.annotation.Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotationsin interfacejava.lang.reflect.AnnotatedElement- Overrides:
getDeclaredAnnotationsin classConstructorInfo
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
- Specified by:
isAnnotationPresentin interfacejava.lang.reflect.AnnotatedElement- Overrides:
isAnnotationPresentin classConstructorInfo
-
addCustomAnnotation
public void addCustomAnnotation(AnnotationBuilder<? extends java.lang.annotation.Annotation> annotation)
-
getCustomAnnotations
public ReadOnlyList<AnnotationBuilder<? extends java.lang.annotation.Annotation>> getCustomAnnotations()
-
-