Class SerdePropertyAccess
java.lang.Object
io.micronaut.serde.util.SerdePropertyAccess
Utility for resolving serde property access from serde and core introspection metadata.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanDeserialize(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Determines whether the property can be deserialized.static booleancanDeserialize(io.micronaut.core.beans.BeanWriteProperty<?, ?> beanProperty, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Determines whether the property can be deserialized.static booleancanSerialize(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Determines whether the property can be serialized.static booleancanSerialize(io.micronaut.core.beans.BeanReadProperty<?, ?> beanProperty, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Determines whether the property can be serialized.static booleanhasRestrictedAccess(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Determines whether the property is restricted to only read or only write access.
-
Method Details
-
canSerialize
public static boolean canSerialize(io.micronaut.core.beans.BeanReadProperty<?, ?> beanProperty, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Determines whether the property can be serialized.- Parameters:
beanProperty- The bean read propertyannotationMetadata- The annotation metadata- Returns:
- Whether the property can be serialized
-
canSerialize
public static boolean canSerialize(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Determines whether the property can be serialized.- Parameters:
annotationMetadata- The annotation metadata- Returns:
- Whether the property can be serialized
-
canDeserialize
public static boolean canDeserialize(io.micronaut.core.beans.BeanWriteProperty<?, ?> beanProperty, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Determines whether the property can be deserialized.- Parameters:
beanProperty- The bean write propertyannotationMetadata- The annotation metadata- Returns:
- Whether the property can be deserialized
-
canDeserialize
public static boolean canDeserialize(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Determines whether the property can be deserialized.- Parameters:
annotationMetadata- The annotation metadata- Returns:
- Whether the property can be deserialized
-
hasRestrictedAccess
public static boolean hasRestrictedAccess(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Determines whether the property is restricted to only read or only write access.- Parameters:
annotationMetadata- The annotation metadata- Returns:
- Whether the property is restricted to only read or only write access
-