Interface UnsafeBeanReadProperty<B,T>
- Type Parameters:
B- The bean typeT- The bean property type
- All Superinterfaces:
AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, ArgumentCoercible<T>, BeanReadProperty<B,T>, Named
- All Known Subinterfaces:
UnsafeBeanProperty<B,T>
- All Known Implementing Classes:
AbstractBeanProperty
Primitive unsafe read methods are part of the generated-introspection dispatch contract.
Their default implementations keep custom UnsafeBeanReadProperty implementations
compatible by delegating to getUnsafe(Object) and unboxing the result. Generated
Micronaut bean properties override these methods and route them through primitive dispatch
methods so hot paths can read primitive values without allocating boxed wrappers.
- Since:
- 4.4.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBERFields inherited from interface AnnotationSource
EMPTY -
Method Summary
Modifier and TypeMethodDescriptiondefault booleangetBooleanUnsafe(B bean) Unsafe primitive version ofBeanReadProperty.get(Object)forbooleanvalues.default bytegetByteUnsafe(B bean) Unsafe primitive version ofBeanReadProperty.get(Object)forbytevalues.default chargetCharUnsafe(B bean) Unsafe primitive version ofBeanReadProperty.get(Object)forcharvalues.default doublegetDoubleUnsafe(B bean) Unsafe primitive version ofBeanReadProperty.get(Object)fordoublevalues.default floatgetFloatUnsafe(B bean) Unsafe primitive version ofBeanReadProperty.get(Object)forfloatvalues.default intgetIntUnsafe(B bean) Unsafe primitive version ofBeanReadProperty.get(Object)forintvalues.default longgetLongUnsafe(B bean) Unsafe primitive version ofBeanReadProperty.get(Object)forlongvalues.default shortgetShortUnsafe(B bean) Unsafe primitive version ofBeanReadProperty.get(Object)forshortvalues.@Nullable TUnsafe version ofBeanReadProperty.get(Object).Methods inherited from interface AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods inherited from interface AnnotationMetadataDelegate
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, copyAnnotationMetadata, 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, getAnnotationValuesByName, getAnnotationValuesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByName, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getTargetAnnotationMetadata, 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, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface AnnotationMetadataProvider
getAnnotationMetadataMethods inherited from interface BeanReadProperty
asArgument, get, get, get, get, get, getDeclaringBean, getDeclaringType, getType
-
Method Details
-
getUnsafe
Unsafe version ofBeanReadProperty.get(Object).- Parameters:
bean- The bean to read from- Returns:
- The value
-
getBooleanUnsafe
Unsafe primitive version ofBeanReadProperty.get(Object)forbooleanvalues.The default implementation boxes through
getUnsafe(Object). Generated introspections override this method when a primitive dispatch target is available.- Parameters:
bean- The bean- Returns:
- The primitive value
- Since:
- 5.1.0
-
getByteUnsafe
Unsafe primitive version ofBeanReadProperty.get(Object)forbytevalues.The default implementation boxes through
getUnsafe(Object). Generated introspections override this method when a primitive dispatch target is available.- Parameters:
bean- The bean- Returns:
- The primitive value
- Since:
- 5.1.0
-
getShortUnsafe
Unsafe primitive version ofBeanReadProperty.get(Object)forshortvalues.The default implementation boxes through
getUnsafe(Object). Generated introspections override this method when a primitive dispatch target is available.- Parameters:
bean- The bean- Returns:
- The primitive value
- Since:
- 5.1.0
-
getCharUnsafe
Unsafe primitive version ofBeanReadProperty.get(Object)forcharvalues.The default implementation boxes through
getUnsafe(Object). Generated introspections override this method when a primitive dispatch target is available.- Parameters:
bean- The bean- Returns:
- The primitive value
- Since:
- 5.1.0
-
getIntUnsafe
Unsafe primitive version ofBeanReadProperty.get(Object)forintvalues.The default implementation boxes through
getUnsafe(Object). Generated introspections override this method when a primitive dispatch target is available.- Parameters:
bean- The bean- Returns:
- The primitive value
- Since:
- 5.1.0
-
getLongUnsafe
Unsafe primitive version ofBeanReadProperty.get(Object)forlongvalues.The default implementation boxes through
getUnsafe(Object). Generated introspections override this method when a primitive dispatch target is available.- Parameters:
bean- The bean- Returns:
- The primitive value
- Since:
- 5.1.0
-
getFloatUnsafe
Unsafe primitive version ofBeanReadProperty.get(Object)forfloatvalues.The default implementation boxes through
getUnsafe(Object). Generated introspections override this method when a primitive dispatch target is available.- Parameters:
bean- The bean- Returns:
- The primitive value
- Since:
- 5.1.0
-
getDoubleUnsafe
Unsafe primitive version ofBeanReadProperty.get(Object)fordoublevalues.The default implementation boxes through
getUnsafe(Object). Generated introspections override this method when a primitive dispatch target is available.- Parameters:
bean- The bean- Returns:
- The primitive value
- Since:
- 5.1.0
-