public abstract class AbstractCoercionTarget extends Object implements CoercionTarget
| Modifier and Type | Field and Description |
|---|---|
protected Class<?> |
owner |
protected CoercionTarget |
parent |
protected Class<?> |
type |
| Constructor and Description |
|---|
AbstractCoercionTarget(Class<?> type,
Class<?> owner,
CoercionTarget parent,
String name) |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
boxedType()
If this target represents a primitive type return the boxing type for it
|
boolean |
canBeAnnotated() |
AnnotatedElement |
getAnnotatedElement() |
CoercionTarget[] |
getComponentCoercionTypes()
Return the
CoercionTargets for the components. |
String |
getName() |
Class<?> |
getOwner()
Return the owning type of the target, for a method this is the class the method was found on similarly for fields.
|
CoercionTarget |
getParent() |
Class<?> |
getType()
Return the type for the target to be coerced
|
boolean |
hasComponents()
Does the target have components, this is true of any container e.g.
|
boolean |
hasParent() |
boolean |
isArray()
Is the underlying target an array
|
boolean |
isPrimitive()
Return true if this target is a primitive type
|
String |
toString() |
protected final Class<?> type
protected final Class<?> owner
protected final CoercionTarget parent
public AbstractCoercionTarget(Class<?> type, Class<?> owner, CoercionTarget parent, String name)
public Class<?> getType()
CoercionTargetgetType in interface CoercionTargetpublic boolean isArray()
CoercionTargetisArray in interface CoercionTargetpublic boolean hasComponents()
CoercionTargetCollection, MaphasComponents in interface CoercionTargetpublic CoercionTarget[] getComponentCoercionTypes()
CoercionTargetCoercionTargets for the components.
For a collection this would return a single CoercionTarget for the element contained.
For a map you would get one for the key and one for the value.getComponentCoercionTypes in interface CoercionTargetpublic boolean isPrimitive()
CoercionTargetisPrimitive in interface CoercionTargetpublic Class<?> boxedType()
CoercionTargetboxedType in interface CoercionTargetpublic boolean canBeAnnotated()
canBeAnnotated in interface CoercionTargetpublic AnnotatedElement getAnnotatedElement()
getAnnotatedElement in interface CoercionTargetpublic Class<?> getOwner()
CoercionTargetgetOwner in interface CoercionTargetpublic CoercionTarget getParent()
getParent in interface CoercionTargetpublic boolean hasParent()
hasParent in interface CoercionTargetpublic String getName()
getName in interface CoercionTargetCopyright © 2003–2017 RedEngine Ltd. All rights reserved.