Package org.yaml.snakeyaml.introspector
Class PropertySubstitute
- java.lang.Object
-
- org.yaml.snakeyaml.introspector.Property
-
- org.yaml.snakeyaml.introspector.PropertySubstitute
-
-
Field Summary
Fields Modifier and Type Field Description private Property
delegate
private java.lang.reflect.Field
field
private boolean
filler
private static Logger
log
protected java.lang.Class<?>[]
parameters
private java.lang.reflect.Method
read
private java.lang.String
readMethod
protected java.lang.Class<?>
targetType
private java.lang.reflect.Method
write
private java.lang.String
writeMethod
-
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.reflect.Method
discoverMethod(java.lang.Class<?> type, java.lang.String name, java.lang.Class<?>... params)
java.lang.Object
get(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 ornull
if it's not present.java.util.List<java.lang.annotation.Annotation>
getAnnotations()
Returns the annotations that are present on this property or emptyList
if there're no annotations.java.lang.String
getName()
java.lang.Class<?>
getType()
boolean
isReadable()
boolean
isWritable()
void
set(java.lang.Object object, java.lang.Object value)
void
setActualTypeArguments(java.lang.Class<?>... args)
void
setDelegate(Property delegate)
void
setTargetType(java.lang.Class<?> targetType)
-
-
-
Field Detail
-
log
private static final Logger log
-
targetType
protected java.lang.Class<?> targetType
-
readMethod
private final java.lang.String readMethod
-
writeMethod
private final java.lang.String writeMethod
-
read
private transient java.lang.reflect.Method read
-
write
private transient java.lang.reflect.Method write
-
field
private java.lang.reflect.Field field
-
parameters
protected java.lang.Class<?>[] parameters
-
delegate
private Property delegate
-
filler
private boolean filler
-
-
Constructor Detail
-
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 Detail
-
getActualTypeArguments
public java.lang.Class<?>[] getActualTypeArguments()
- Specified by:
getActualTypeArguments
in 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
-
getAnnotations
public java.util.List<java.lang.annotation.Annotation> getAnnotations()
Description copied from class:Property
Returns the annotations that are present on this property or emptyList
if there're no annotations.- Specified by:
getAnnotations
in classProperty
- Returns:
- the annotations that are present on this property or empty
List
if there're no annotations
-
getAnnotation
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
Description copied from class:Property
Returns property's annotation for the given type ornull
if it's not present.- Specified by:
getAnnotation
in 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
null
if it's not present
-
setTargetType
public void setTargetType(java.lang.Class<?> targetType)
-
discoverMethod
private java.lang.reflect.Method discoverMethod(java.lang.Class<?> type, java.lang.String name, java.lang.Class<?>... params)
-
isReadable
public boolean isReadable()
- Overrides:
isReadable
in classProperty
-
isWritable
public boolean isWritable()
- Overrides:
isWritable
in classProperty
-
setDelegate
public void setDelegate(Property delegate)
-
-