org.apache.bval.jsr303
Class NestedMetaProperty

java.lang.Object
  extended by org.apache.bval.jsr303.NestedMetaProperty

final class NestedMetaProperty
extends Object

Description: handle nested property paths


Constructor Summary
NestedMetaProperty(String path, Object value)
          Create a new NestedMetaProperty instance.
 
Method Summary
(package private) static Class<? extends Collection<?>> getCollectionClass(Type type)
          Resolve the raw type of a Collection.
(package private) static Type getIndexedType(Type type)
          Get the component type of an indexed type.
 MetaBean getMetaBean()
          Get the resolved MetaBean.
 MetaProperty getMetaProperty()
          Get the resolved MetaProperty.
 String getPropertyPath()
          Get the property path.
 Object getValue()
          Get the property value referenced.
(package private) static boolean isArray(Type type)
          Learn whether a particular type represents an array.
(package private) static boolean isCollection(Type type)
          Learn whether type is a Collection type.
(package private) static boolean isCollectionClass(Class<?> clazz)
          Learn whether clazz implements either Collection or Map.
 boolean isNested()
          Learn whether the MetaProperty represented is indeed nested.
(package private)  void parse()
          Parse this NestedMetaProperty.
 void setMetaBean(MetaBean metaBean)
          Set the MetaBean directly
 void setMetaProperty(MetaProperty aMetaProperty)
          Set the MetaProperty directly
 void setValue(Object value)
          Set the property value directly.
(package private) static Type typeOf(Member member)
          Get the declared type of a Member.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NestedMetaProperty

public NestedMetaProperty(String path,
                          Object value)
Create a new NestedMetaProperty instance.

Parameters:
path -
value -
Method Detail

parse

void parse()
Parse this NestedMetaProperty.


getMetaProperty

public MetaProperty getMetaProperty()
Get the resolved MetaProperty.

Returns:
MetaProperty

getPropertyPath

public String getPropertyPath()
Get the property path.

Returns:
String path

isNested

public boolean isNested()
Learn whether the MetaProperty represented is indeed nested.

Returns:
boolean

setMetaProperty

public void setMetaProperty(MetaProperty aMetaProperty)
Set the MetaProperty directly

Parameters:
aMetaProperty - to set

getMetaBean

public MetaBean getMetaBean()
Get the resolved MetaBean.

Returns:
MetaBean

setMetaBean

public void setMetaBean(MetaBean metaBean)
Set the MetaBean directly

Parameters:
metaBean - to set

getValue

public Object getValue()
Get the property value referenced.

Returns:
Object

setValue

public void setValue(Object value)
Set the property value directly.

Parameters:
value - to set

typeOf

static Type typeOf(Member member)
Get the declared type of a Member.

Parameters:
member -
Returns:
generic type

getIndexedType

static Type getIndexedType(Type type)
Get the component type of an indexed type.

Parameters:
type -
Returns:
Type

getCollectionClass

static Class<? extends Collection<?>> getCollectionClass(Type type)
Resolve the raw type of a Collection.

Parameters:
type -
Returns:
Class if found

isArray

static boolean isArray(Type type)
Learn whether a particular type represents an array.

Parameters:
type -
Returns:
boolean

isCollection

static boolean isCollection(Type type)
Learn whether type is a Collection type.

Parameters:
type - the type to check.
Returns:
Returns true if type is a collection type or false otherwise.

isCollectionClass

static boolean isCollectionClass(Class<?> clazz)
Learn whether clazz implements either Collection or Map.

Parameters:
clazz -
Returns:
boolean


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.