Package org.yaml.snakeyaml.introspector
Class Property
java.lang.Object
org.yaml.snakeyaml.introspector.Property
- All Implemented Interfaces:
Comparable<Property>
- Direct Known Subclasses:
GenericProperty,MissingProperty,PropertySubstitute
A Property represents a single member variable of a class, possibly including its
accessor methods (getX, setX). The name stored in this class is the actual name of the property
as given for the class, not an alias.
Objects of this class have a total ordering which defaults to ordering based on the name of the property.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanabstract Objectabstract Class<?>[]abstract <A extends Annotation>
AgetAnnotation(Class<A> annotationType) Returns property's annotation for the given type ornullif it's not present.abstract List<Annotation>Returns the annotations that are present on this property or emptyListif there're no annotations.getName()Class<?>getType()inthashCode()booleanbooleanabstract voidtoString()
-
Constructor Details
-
Property
-
-
Method Details
-
getType
-
getActualTypeArguments
-
getName
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<Property>
-
isWritable
public boolean isWritable() -
isReadable
public boolean isReadable() -
set
- Throws:
Exception
-
get
-
getAnnotations
Returns the annotations that are present on this property or emptyListif there're no annotations.- 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.- 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
-
hashCode
public int hashCode() -
equals
-