Package org.yaml.snakeyaml.introspector
Class MethodProperty
java.lang.Object
org.yaml.snakeyaml.introspector.Property
org.yaml.snakeyaml.introspector.GenericProperty
org.yaml.snakeyaml.introspector.MethodProperty
- All Implemented Interfaces:
Comparable<Property>
A MethodProperty is a Property which is accessed through accessor
methods (setX, getX). It is possible to have a MethodProperty which has only setter,
only getter, or both. It is not possible to have a MethodProperty which has neither
setter nor getter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
AgetAnnotation(Class<A> annotationType) Returns property's annotation for the given type ornullif it's not present.Returns the annotations that are present on read and write methods of this property or emptyListif there're no annotations.booleanbooleanvoidMethods inherited from class org.yaml.snakeyaml.introspector.GenericProperty
getActualTypeArguments
-
Constructor Details
-
MethodProperty
-
-
Method Details
-
set
-
get
-
getAnnotations
Returns the annotations that are present on read and write methods of this property or emptyListif there're no annotations.- Specified by:
getAnnotationsin classProperty- Returns:
- the annotations that are present on this property or empty
Listif there're no annotations
-
getAnnotation
Returns property's annotation for the given type ornullif it's not present. If the annotation is present on both read and write methods, the annotation on read method takes precedence.- Specified by:
getAnnotationin classProperty- Type Parameters:
A- class of the annotation- Parameters:
annotationType- the type of the annotation to be returned- Returns:
- property's annotation for the given type or
nullif it's not present
-
isWritable
public boolean isWritable()- Overrides:
isWritablein classProperty
-
isReadable
public boolean isReadable()- Overrides:
isReadablein classProperty
-