Class FieldBuilder
java.lang.Object
com.strobel.reflection.MemberInfo
com.strobel.reflection.FieldInfo
com.strobel.reflection.emit.FieldBuilder
- All Implemented Interfaces:
AnnotatedElement
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ReadOnlyList<AnnotationBuilder<? extends Annotation>> private final Objectprivate final intprivate final Stringprivate Type<?> private final TypeBuilder<?> (package private) FieldInfo -
Constructor Summary
ConstructorsConstructorDescriptionFieldBuilder(TypeBuilder<?> typeBuilder, String name, Type<?> type, int modifiers, Object constantValue) -
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
voidaddCustomAnnotation(AnnotationBuilder<A> annotation) <T extends Annotation>
TgetAnnotation(Class<T> annotationClass) (package private) FieldInfoReadOnlyList<AnnotationBuilder<? extends Annotation>> TypeBuilder<?> Type<?> intgetName()Type<?> booleanisAnnotationPresent(Class<? extends Annotation> annotationClass) voidsetFieldType(Type<?> fieldType) (package private) voidMethods inherited from class FieldInfo
appendBriefDescription, appendDescription, appendErasedDescription, appendErasedSignature, appendSignature, appendSimpleDescription, getMemberType, getValue, isEnumConstant, isEquivalentTo, setValue, toStringMethods inherited from class MemberInfo
appendGenericSignature, emptyAnnotations, equals, getAnnotationsByType, getBriefDescription, getDeclaredAnnotation, getDeclaredAnnotationsByType, getDescription, getErasedDescription, getErasedSignature, getSignature, getSimpleDescription, hashCode, invalidateCaches, isFinal, isNonPublic, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
Field Details
-
_typeBuilder
-
_name
-
_modifiers
private final int _modifiers -
_constantValue
-
_type
-
_annotations
-
generatedField
FieldInfo generatedField
-
-
Constructor Details
-
FieldBuilder
FieldBuilder(TypeBuilder<?> typeBuilder, String name, Type<?> type, int modifiers, Object constantValue)
-
-
Method Details
-
getCreatedField
FieldInfo getCreatedField() -
addCustomAnnotation
-
getCustomAnnotations
-
verifyTypeNotCreated
void verifyTypeNotCreated() -
getFieldType
- Specified by:
getFieldTypein classFieldInfo
-
setFieldType
-
getRawField
- Specified by:
getRawFieldin classFieldInfo
-
getName
- Specified by:
getNamein classMemberInfo
-
getDeclaringType
- Specified by:
getDeclaringTypein classMemberInfo
-
getModifiers
public int getModifiers()- Specified by:
getModifiersin classMemberInfo
-
getConstantValue
-
getReflectedType
- Overrides:
getReflectedTypein classMemberInfo
-
getAnnotation
- Specified by:
getAnnotationin interfaceAnnotatedElement- Overrides:
getAnnotationin classFieldInfo
-
getAnnotations
- Specified by:
getAnnotationsin interfaceAnnotatedElement- Overrides:
getAnnotationsin classFieldInfo
-
getDeclaredAnnotations
- Specified by:
getDeclaredAnnotationsin interfaceAnnotatedElement- Overrides:
getDeclaredAnnotationsin classFieldInfo
-
isAnnotationPresent
- Specified by:
isAnnotationPresentin interfaceAnnotatedElement- Overrides:
isAnnotationPresentin classFieldInfo
-