B
- The bean typepublic abstract class AbstractInitializableBeanIntrospection<B>
extends java.lang.Object
implements io.micronaut.core.beans.BeanIntrospection<B>
BeanIntrospection
interface. This class is subclasses at compilation time by generated byte code and should not be used directly.
Implementation is using method dispatch to access the bean instance.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractInitializableBeanIntrospection.BeanMethodRef<P>
Bean method compile-time data container.
|
static class |
AbstractInitializableBeanIntrospection.BeanPropertyRef<P>
Bean property compile-time data container.
|
Constructor and Description |
---|
AbstractInitializableBeanIntrospection(java.lang.Class<B> beanType,
io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
io.micronaut.core.annotation.AnnotationMetadata constructorAnnotationMetadata,
io.micronaut.core.type.Argument<?>[] constructorArguments,
AbstractInitializableBeanIntrospection.BeanPropertyRef<java.lang.Object>[] propertiesRefs,
AbstractInitializableBeanIntrospection.BeanMethodRef<java.lang.Object>[] methodsRefs) |
Modifier and Type | Method and Description |
---|---|
protected <V> V |
dispatch(int index,
B target,
java.lang.Object[] args)
Triggers the invocation of the method at index.
|
protected <V> V |
dispatchOne(int index,
java.lang.Object target,
java.lang.Object arg)
Triggers the invocation of the method at index for a single argument call.
|
boolean |
equals(java.lang.Object o) |
io.micronaut.core.beans.BeanProperty<B,java.lang.Object> |
findIndexedProperty(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
java.lang.String annotationValue)
Get all the bean properties annotated for the given type.
|
io.micronaut.core.annotation.AnnotationMetadata |
getAnnotationMetadata() |
java.util.Collection<io.micronaut.core.beans.BeanMethod<B,java.lang.Object>> |
getBeanMethods() |
java.util.Collection<io.micronaut.core.beans.BeanProperty<B,java.lang.Object>> |
getBeanProperties() |
protected java.util.Collection<io.micronaut.core.beans.BeanProperty<B,java.lang.Object>> |
getBeanPropertiesIndexedSubset(int[] indexes)
Returns subset of bean properties defined by an array of indexes.
|
java.lang.Class<B> |
getBeanType() |
io.micronaut.core.beans.BeanConstructor<B> |
getConstructor() |
io.micronaut.core.type.Argument<?>[] |
getConstructorArguments() |
java.util.Collection<io.micronaut.core.beans.BeanProperty<B,java.lang.Object>> |
getIndexedProperties(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) |
java.util.Optional<io.micronaut.core.beans.BeanProperty<B,java.lang.Object>> |
getIndexedProperty(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
java.lang.String annotationValue) |
java.util.Optional<io.micronaut.core.beans.BeanProperty<B,java.lang.Object>> |
getProperty(java.lang.String name) |
protected io.micronaut.core.beans.BeanProperty<B,java.lang.Object> |
getPropertyByIndex(int index)
Obtain a property by its index.
|
int |
hashCode() |
B |
instantiate() |
B |
instantiate(boolean strictNullable,
java.lang.Object... arguments) |
protected abstract B |
instantiateInternal(java.lang.Object[] arguments)
Reflection free bean instantiation implementation for the given arguments.
|
java.lang.String |
toString() |
protected java.lang.RuntimeException |
unknownDispatchAtIndexException(int index)
Creates a new exception when the dispatch at index is not found.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getIndexedProperty, getIntrospection, getProperty, getPropertyNames, getRequiredProperty, instantiate, propertyIndexOf
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, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, 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, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
public AbstractInitializableBeanIntrospection(java.lang.Class<B> beanType, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, io.micronaut.core.annotation.AnnotationMetadata constructorAnnotationMetadata, io.micronaut.core.type.Argument<?>[] constructorArguments, AbstractInitializableBeanIntrospection.BeanPropertyRef<java.lang.Object>[] propertiesRefs, AbstractInitializableBeanIntrospection.BeanMethodRef<java.lang.Object>[] methodsRefs)
@NonNull @Internal protected abstract B instantiateInternal(@Nullable java.lang.Object[] arguments)
arguments
- The arguments@Internal protected io.micronaut.core.beans.BeanProperty<B,java.lang.Object> getPropertyByIndex(int index)
index
- The index of the property@Nullable protected <V> V dispatch(int index, @NonNull B target, @Nullable java.lang.Object[] args)
V
- The result typeindex
- The method indextarget
- The targetargs
- The arguments@Nullable protected <V> V dispatchOne(int index, @NonNull java.lang.Object target, @Nullable java.lang.Object arg)
V
- The result typeindex
- The method indextarget
- The targetarg
- The argumentprotected final java.lang.RuntimeException unknownDispatchAtIndexException(int index)
index
- The method index@Nullable public io.micronaut.core.beans.BeanProperty<B,java.lang.Object> findIndexedProperty(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, @NonNull java.lang.String annotationValue)
getIndexedProperty
.annotationType
- The annotation typeannotationValue
- The annotation valueIntrospected.indexed()
@NonNull public java.util.Collection<io.micronaut.core.beans.BeanProperty<B,java.lang.Object>> getIndexedProperties(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
getIndexedProperties
in interface io.micronaut.core.beans.BeanIntrospection<B>
protected java.util.Collection<io.micronaut.core.beans.BeanProperty<B,java.lang.Object>> getBeanPropertiesIndexedSubset(int[] indexes)
indexes
- The indexespublic B instantiate() throws io.micronaut.core.reflect.exception.InstantiationException
instantiate
in interface io.micronaut.core.beans.BeanIntrospection<B>
io.micronaut.core.reflect.exception.InstantiationException
@NonNull public B instantiate(boolean strictNullable, java.lang.Object... arguments) throws io.micronaut.core.reflect.exception.InstantiationException
instantiate
in interface io.micronaut.core.beans.BeanIntrospection<B>
io.micronaut.core.reflect.exception.InstantiationException
public io.micronaut.core.beans.BeanConstructor<B> getConstructor()
getConstructor
in interface io.micronaut.core.beans.BeanIntrospection<B>
public io.micronaut.core.type.Argument<?>[] getConstructorArguments()
getConstructorArguments
in interface io.micronaut.core.beans.BeanIntrospection<B>
@NonNull public java.util.Optional<io.micronaut.core.beans.BeanProperty<B,java.lang.Object>> getIndexedProperty(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, @NonNull java.lang.String annotationValue)
getIndexedProperty
in interface io.micronaut.core.beans.BeanIntrospection<B>
@NonNull public java.util.Optional<io.micronaut.core.beans.BeanProperty<B,java.lang.Object>> getProperty(@NonNull java.lang.String name)
getProperty
in interface io.micronaut.core.beans.BeanIntrospection<B>
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
getAnnotationMetadata
in interface io.micronaut.core.annotation.AnnotationMetadataProvider
@NonNull public java.util.Collection<io.micronaut.core.beans.BeanProperty<B,java.lang.Object>> getBeanProperties()
getBeanProperties
in interface io.micronaut.core.beans.BeanIntrospection<B>
@NonNull public java.lang.Class<B> getBeanType()
getBeanType
in interface io.micronaut.core.beans.BeanIntrospection<B>
@NonNull public java.util.Collection<io.micronaut.core.beans.BeanMethod<B,java.lang.Object>> getBeanMethods()
getBeanMethods
in interface io.micronaut.core.beans.BeanIntrospection<B>
public 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