net.stickycode.coercion.target
Class ParameterizedArrayCoercionTarget

java.lang.Object
  extended by net.stickycode.coercion.target.ParameterizedArrayCoercionTarget
All Implemented Interfaces:
CoercionTarget

public class ParameterizedArrayCoercionTarget
extends Object
implements CoercionTarget


Constructor Summary
ParameterizedArrayCoercionTarget(GenericArrayType genericType, Class<?> owner, CoercionTarget parent)
           
 
Method Summary
 Class<?> boxedType()
          If this target represents a primitive type return the boxing type for it
 boolean canBeAnnotated()
           
 boolean equals(Object obj)
           
 AnnotatedElement getAnnotatedElement()
           
 CoercionTarget[] getComponentCoercionTypes()
          Return the CoercionTargets for the components.
 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.
 int hashCode()
           
 boolean hasParent()
           
 boolean isArray()
          Is the underlying target an array
 boolean isPrimitive()
          Return true if this target is a primitive type
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterizedArrayCoercionTarget

public ParameterizedArrayCoercionTarget(GenericArrayType genericType,
                                        Class<?> owner,
                                        CoercionTarget parent)
Method Detail

getType

public Class<?> getType()
Description copied from interface: CoercionTarget
Return the type for the target to be coerced

Specified by:
getType in interface CoercionTarget

hasComponents

public boolean hasComponents()
Description copied from interface: CoercionTarget
Does the target have components, this is true of any container e.g. Collection, Map

Specified by:
hasComponents in interface CoercionTarget

getComponentCoercionTypes

public CoercionTarget[] getComponentCoercionTypes()
Description copied from interface: CoercionTarget
Return the CoercionTargets 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.

Specified by:
getComponentCoercionTypes in interface CoercionTarget

isArray

public boolean isArray()
Description copied from interface: CoercionTarget
Is the underlying target an array

Specified by:
isArray in interface CoercionTarget

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

isPrimitive

public boolean isPrimitive()
Description copied from interface: CoercionTarget
Return true if this target is a primitive type

Specified by:
isPrimitive in interface CoercionTarget

boxedType

public Class<?> boxedType()
Description copied from interface: CoercionTarget
If this target represents a primitive type return the boxing type for it

Specified by:
boxedType in interface CoercionTarget

canBeAnnotated

public boolean canBeAnnotated()
Specified by:
canBeAnnotated in interface CoercionTarget

getAnnotatedElement

public AnnotatedElement getAnnotatedElement()
Specified by:
getAnnotatedElement in interface CoercionTarget

getOwner

public Class<?> getOwner()
Description copied from interface: CoercionTarget
Return the owning type of the target, for a method this is the class the method was found on similarly for fields.

Specified by:
getOwner in interface CoercionTarget

toString

public String toString()
Overrides:
toString in class Object

getParent

public CoercionTarget getParent()
Specified by:
getParent in interface CoercionTarget

hasParent

public boolean hasParent()
Specified by:
hasParent in interface CoercionTarget


Copyright © 2003-2012 RedEngine Ltd. All Rights Reserved.