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>
,Named
- All Known Implementing Classes:
AbstractBeanProperty
public interface UnsafeBeanProperty<B,T> extends 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
-
-
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getUnsafe(B bean)
Unsafe version ofBeanProperty.get(Object)
.void
setUnsafe(B bean, T value)
Unsafe version ofBeanProperty.set(Object, Object)
.B
withValueUnsafe(B bean, T value)
Unsafe version ofBeanProperty.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
getAnnotationValuesByName, getAnnotationValuesByStereotype, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate
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, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, 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
-
-
-
-
Method Detail
-
getUnsafe
T getUnsafe(@NonNull B bean)
Unsafe version ofBeanProperty.get(Object)
.- Parameters:
bean
- The bean to read from- Returns:
- The value
-
withValueUnsafe
@NonNull B withValueUnsafe(@NonNull B bean, @Nullable T value)
Unsafe version ofBeanProperty.withValue(Object, Object)
.- 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
void setUnsafe(@NonNull B bean, @Nullable T value)
Unsafe version ofBeanProperty.set(Object, Object)
.- Parameters:
bean
- The beanvalue
- The value to write
-
-