B
- The bean typeP
- The property type@Internal public abstract class AbstractBeanProperty<B,P> extends java.lang.Object implements BeanProperty<B,P>
BeanProperty
. Generated byte code should be used to create a subclass
and implement the BeanProperty.get(Object)
and BeanProperty.set(Object, Object)
methods. This class is subclasses at compilation time by generated byte code and should not be used directly.CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier | Constructor and Description |
---|---|
protected |
AbstractBeanProperty(BeanIntrospection<B> introspection,
java.lang.Class<P> type,
java.lang.String name,
AnnotationMetadata annotationMetadata,
Argument[] typeArguments)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Argument<P> |
asArgument()
Represent the type as an argument, including any generic type information.
|
boolean |
equals(java.lang.Object o) |
P |
get(B bean)
Read the bean value.
|
AnnotationMetadata |
getAnnotationMetadata()
Supplies the metadata.
|
BeanIntrospection<B> |
getDeclaringBean() |
java.lang.String |
getName() |
java.lang.Class<P> |
getType() |
int |
hashCode() |
protected abstract P |
readInternal(B bean)
Reads the bean property.
|
void |
set(B bean,
P value)
Write the bean value.
|
java.lang.String |
toString() |
protected abstract void |
writeInternal(B bean,
P value)
Writes a property value.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
convertAndSet, get, get, get, get, getDeclaringType, isReadOnly, isReadWrite, isWriteOnly
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
@Internal protected AbstractBeanProperty(@NonNull BeanIntrospection<B> introspection, @NonNull java.lang.Class<P> type, @NonNull java.lang.String name, @Nullable AnnotationMetadata annotationMetadata, @Nullable Argument[] typeArguments)
introspection
- The parent introspectiontype
- The property typename
- The property nameannotationMetadata
- The annotation metadatatypeArguments
- optional type arguments@NonNull public java.lang.String getName()
@NonNull public java.lang.Class<P> getType()
getType
in interface BeanProperty<B,P>
public Argument<P> asArgument()
BeanProperty
asArgument
in interface BeanProperty<B,P>
@NonNull public BeanIntrospection<B> getDeclaringBean()
getDeclaringBean
in interface BeanProperty<B,P>
public AnnotationMetadata getAnnotationMetadata()
AnnotationMetadataProvider
AnnotationMetadata.EMPTY_METADATA
.getAnnotationMetadata
in interface AnnotationMetadataProvider
AnnotationMetadata
@Nullable public final P get(@NonNull B bean)
BeanProperty
get
in interface BeanProperty<B,P>
bean
- The bean to read frompublic final void set(@NonNull B bean, @Nullable P value)
BeanProperty
set
in interface BeanProperty<B,P>
bean
- The beanvalue
- The value to write@Internal protected abstract void writeInternal(@NonNull B bean, @Nullable P value)
bean
- The beanvalue
- The value@Internal protected abstract P readInternal(@NonNull B bean)
bean
- The beanpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object