Top Description Fields Constructors Methods
org.yaml.snakeyaml.introspector

public Class MethodProperty

extends GenericProperty
Class Inheritance
Imports
java.beans.PropertyDescriptor, java.lang.annotation.Annotation, java.lang.reflect.Method, .Type, java.util.List, org.yaml.snakeyaml.error.YAMLException, org.yaml.snakeyaml.util.ArrayUtils

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.

Field Summary

Modifier and TypeField and Description
private final java.beans.PropertyDescriptor
private final boolean
private final boolean

Constructor Summary

AccessConstructor and Description
public
MethodProperty(java.beans.PropertyDescriptor property)

Method Summary

Modifier and TypeMethod and Description
private static Type
discoverGenericType(java.beans.PropertyDescriptor property)

public Object
public <A extends Annotation> A

Returns:

property's annotation for the given type or null if it's not present
getAnnotation
(Class<A>
the type of the annotation to be returned
annotationType
)

Implements abstract org.yaml.snakeyaml.introspector.Property.getAnnotation.

Returns property's annotation for the given type or null if it's not present.
public List<Annotation>

Returns:

the annotations that are present on this property or empty List if there're no annotations
getAnnotations
()

Implements abstract org.yaml.snakeyaml.introspector.Property.getAnnotations.

Returns the annotations that are present on read and write methods of this property or empty List if there're no annotations.
public boolean
public boolean
public void
Inherited from org.yaml.snakeyaml.introspector.GenericProperty:
getActualTypeArguments

Field Detail

propertyback to summary
private final java.beans.PropertyDescriptor property
readableback to summary
private final boolean readable
writableback to summary
private final boolean writable

Constructor Detail

MethodPropertyback to summary
public MethodProperty(java.beans.PropertyDescriptor property)

Method Detail

discoverGenericTypeback to summary
private static Type discoverGenericType(java.beans.PropertyDescriptor property)
getback to summary
public Object get(Object object)

Implements abstract org.yaml.snakeyaml.introspector.Property.get.

Annotations
@Override
getAnnotationback to summary
public <A extends Annotation> A getAnnotation(Class<A> annotationType)

Implements abstract org.yaml.snakeyaml.introspector.Property.getAnnotation.

Returns property's annotation for the given type or null if it's not present. If the annotation is present on both read and write methods, the annotation on read method takes precedence.

Parameters
<A>

Doc from org.yaml.snakeyaml.introspector.Property.getAnnotation. class of the annotation

annotationType:Class<A>

the type of the annotation to be returned

Returns:A

property's annotation for the given type or null if it's not present

Annotations
@Override
getAnnotationsback to summary
public List<Annotation> getAnnotations()

Implements abstract org.yaml.snakeyaml.introspector.Property.getAnnotations.

Returns the annotations that are present on read and write methods of this property or empty List if there're no annotations.

Returns:List<Annotation>

the annotations that are present on this property or empty List if there're no annotations

Annotations
@Override
isReadableback to summary
public boolean isReadable()

Overrides org.yaml.snakeyaml.introspector.Property.isReadable.

Annotations
@Override
isWritableback to summary
public boolean isWritable()

Overrides org.yaml.snakeyaml.introspector.Property.isWritable.

Annotations
@Override
setback to summary
public void set(Object object, Object value) throws Exception

Implements abstract org.yaml.snakeyaml.introspector.Property.set.

Annotations
@Override