public class LiteralPropertyConduit extends PropertyConduitDelegate implements InternalPropertyConduit
Constructor and Description |
---|
LiteralPropertyConduit(TypeCoercer typeCoercer,
Class propertyType,
AnnotationProvider annotationProvider,
String description,
Object value) |
Modifier and Type | Method and Description |
---|---|
Object |
get(Object instance)
Reads the property from the instance.
|
<T extends Annotation> |
getAnnotation(Class<T> annotationClass)
Searches for the specified annotation, returning the matching annotation instance.
|
Type |
getPropertyGenericType()
Returns the generic type of the property
|
String |
getPropertyName()
Returns the name of the property read or updated by the conduit or null.
|
Class |
getPropertyType()
Returns the type of the property read or updated by the conduit.
|
void |
set(Object instance,
Object value)
Changes the current value of the property.
|
String |
toString() |
coerce, invert, range
public LiteralPropertyConduit(TypeCoercer typeCoercer, Class propertyType, AnnotationProvider annotationProvider, String description, Object value)
public Object get(Object instance)
PropertyConduit
get
in interface PropertyConduit
instance
- object containing the propertypublic void set(Object instance, Object value)
PropertyConduit
set
in interface PropertyConduit
instance
- object containing the propertyvalue
- to change the property topublic Class getPropertyType()
PropertyConduit
getPropertyType
in interface PropertyConduit
public Type getPropertyGenericType()
PropertyConduit2
getPropertyGenericType
in interface PropertyConduit2
Method.getGenericReturnType()
,
Field.getGenericType()
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
AnnotationProvider
getAnnotation
in interface AnnotationProvider
annotationClass
- used to select the annotation to returnpublic String getPropertyName()
InternalPropertyConduit
null
.getPropertyName
in interface InternalPropertyConduit
null
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.