Package org.yaml.snakeyaml.introspector
Class PropertySubstitute
java.lang.Object
org.yaml.snakeyaml.introspector.Property
org.yaml.snakeyaml.introspector.PropertySubstitute
- All Implemented Interfaces:
java.lang.Comparable<Property>
public class PropertySubstitute extends Property
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<?>[]parametersprotected java.lang.Class<?>targetType -
Constructor Summary
Constructors Constructor Description PropertySubstitute(java.lang.String name, java.lang.Class<?> type, java.lang.Class<?>... params)PropertySubstitute(java.lang.String name, java.lang.Class<?> type, java.lang.String readMethod, java.lang.String writeMethod, java.lang.Class<?>... params) -
Method Summary
Modifier and Type Method Description java.lang.Objectget(java.lang.Object object)java.lang.Class<?>[]getActualTypeArguments()<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.java.lang.StringgetName()java.lang.Class<?>getType()booleanisReadable()booleanisWritable()voidset(java.lang.Object object, java.lang.Object value)voidsetActualTypeArguments(java.lang.Class<?>... args)voidsetDelegate(Property delegate)voidsetTargetType(java.lang.Class<?> targetType)
-
Field Details
-
targetType
protected java.lang.Class<?> targetType -
parameters
protected java.lang.Class<?>[] parameters
-
-
Constructor Details
-
PropertySubstitute
public PropertySubstitute(java.lang.String name, java.lang.Class<?> type, java.lang.String readMethod, java.lang.String writeMethod, java.lang.Class<?>... params) -
PropertySubstitute
public PropertySubstitute(java.lang.String name, java.lang.Class<?> type, java.lang.Class<?>... params)
-
-
Method Details
-
getActualTypeArguments
public java.lang.Class<?>[] getActualTypeArguments()- Specified by:
getActualTypeArgumentsin classProperty
-
setActualTypeArguments
public void setActualTypeArguments(java.lang.Class<?>... args) -
set
public void set(java.lang.Object object, java.lang.Object value) throws java.lang.Exception -
get
public java.lang.Object get(java.lang.Object object) -
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
-
setTargetType
public void setTargetType(java.lang.Class<?> targetType) -
getName
public java.lang.String getName() -
getType
public java.lang.Class<?> getType() -
isReadable
public boolean isReadable()- Overrides:
isReadablein classProperty
-
isWritable
public boolean isWritable()- Overrides:
isWritablein classProperty
-
setDelegate
-