Package io.micronaut.core.beans
Interface UnsafeBeanProperty<B,T>
- Type Parameters:
B
- The bean typeT
- The bean property type
- All Superinterfaces:
AnnotatedElement
,AnnotationMetadata
,AnnotationMetadataDelegate
,AnnotationMetadataProvider
,AnnotationSource
,ArgumentCoercible<T>
,BeanProperty<B,
,T> BeanReadProperty<B,
,T> BeanWriteProperty<B,
,T> Named
,UnsafeBeanReadProperty<B,
,T> UnsafeBeanWriteProperty<B,
T>
- All Known Implementing Classes:
AbstractBeanProperty
@NextMajorVersion("Remove all the methods, only keeping those in read/write interfaces")
public interface UnsafeBeanProperty<B,T>
extends UnsafeBeanWriteProperty<B,T>, UnsafeBeanReadProperty<B,T>, BeanProperty<B,T>
Unsafe bean property interface adds read/write methods which don't validate the input/output.
It's the responsibility of the caller to validate the value.
- Since:
- 3.3.1
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionUnsafe version ofBeanReadProperty.get(Object)
.void
Unsafe version ofBeanWriteProperty.set(Object, Object)
.withValueUnsafe
(B bean, T value) Unsafe version ofBeanWriteProperty.withValue(Object, Object)
.Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent
Methods inherited from interface io.micronaut.core.annotation.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, synthesizeDeclaredAnnotationsByType
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
getAnnotationMetadata
Methods inherited from interface io.micronaut.core.beans.BeanProperty
asArgument, convertAndSet, get, get, get, get, get, getDeclaringBean, getDeclaringType, getType, hasSetterOrConstructorArgument, isReadOnly, isReadWrite, isWriteOnly, set, withValue
Methods inherited from interface io.micronaut.core.beans.BeanWriteProperty
asArgument, getDeclaringBean, getDeclaringType, getType
-
Method Details
-
getUnsafe
Unsafe version ofBeanReadProperty.get(Object)
.- Specified by:
getUnsafe
in interfaceUnsafeBeanReadProperty<B,
T> - Parameters:
bean
- The bean to read from- Returns:
- The value
-
withValueUnsafe
Unsafe version ofBeanWriteProperty.withValue(Object, Object)
.- Specified by:
withValueUnsafe
in interfaceUnsafeBeanWriteProperty<B,
T> - Parameters:
bean
- The beanvalue
- The new value- Returns:
- Either the existing instance or the property is mutable or a newly created instance via the copy constructor pattern.
-
setUnsafe
Unsafe version ofBeanWriteProperty.set(Object, Object)
.- Specified by:
setUnsafe
in interfaceUnsafeBeanWriteProperty<B,
T> - Parameters:
bean
- The beanvalue
- The value to write
-