Package org.yaml.snakeyaml.introspector
Class FieldProperty
- java.lang.Object
-
- org.yaml.snakeyaml.introspector.Property
-
- org.yaml.snakeyaml.introspector.GenericProperty
-
- org.yaml.snakeyaml.introspector.FieldProperty
-
- All Implemented Interfaces:
java.lang.Comparable<Property>
public class FieldProperty extends GenericProperty
A
FieldPropertyis aPropertywhich is accessed as a field, without going through accessor methods (setX, getX). The field may have any scope (public, package, protected, private).
-
-
Constructor Summary
Constructors Constructor Description FieldProperty(java.lang.reflect.Field field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectget(java.lang.Object object)<A extends java.lang.annotation.Annotation>
AgetAnnotation(java.lang.Class<A> annotationType)Returns property's annotation for the given type ornullif it's not present.java.util.List<java.lang.annotation.Annotation>getAnnotations()Returns the annotations that are present on this property or emptyListif there're no annotations.voidset(java.lang.Object object, java.lang.Object value)-
Methods inherited from class org.yaml.snakeyaml.introspector.GenericProperty
getActualTypeArguments
-
Methods inherited from class org.yaml.snakeyaml.introspector.Property
compareTo, equals, getName, getType, hashCode, isReadable, isWritable, toString
-
-
-
-
Method Detail
-
set
public void set(java.lang.Object object, java.lang.Object value) throws java.lang.Exception
-
getAnnotations
public java.util.List<java.lang.annotation.Annotation> getAnnotations()
Description copied from class:PropertyReturns the annotations that are present on 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
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
Description copied from class:PropertyReturns property's annotation for the given type ornullif it's not present.- 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
-
-