org.qi4j.api.query.grammar
Interface PropertyReference<T>


public interface PropertyReference<T>

An expression related to Property.


Method Summary
 Property<T> eval(Object target)
          Evaluates the property reference against a target object.
 Method propertyAccessor()
          Get the accessor method for the property.
 Class<?> propertyDeclaringType()
          Get the type of the interface that declared the property.
 String propertyName()
          Get the name of the property, which is equal to the name of the method that declared it.
 Class<T> propertyType()
          Get the type of the property.
 AssociationReference traversedAssociation()
          Gets the traversed association used to get to this property or null if there was no association traversal involved.
 PropertyReference traversedProperty()
          Gets the traversed property used to get to this property or null if there was no property traversal involved.
 

Method Detail

propertyName

String propertyName()
Get the name of the property, which is equal to the name of the method that declared it.

Returns:
the name of the property

propertyDeclaringType

Class<?> propertyDeclaringType()
Get the type of the interface that declared the property.

Returns:
the type of property that declared the property

propertyAccessor

Method propertyAccessor()
Get the accessor method for the property.

Returns:
accessor method

propertyType

Class<T> propertyType()
Get the type of the property. If the property is declared as Property then X is returned.

Returns:
the property type

traversedAssociation

AssociationReference traversedAssociation()
Gets the traversed association used to get to this property or null if there was no association traversal involved.

Returns:
traversed association used to get to this property.

traversedProperty

PropertyReference traversedProperty()
Gets the traversed property used to get to this property or null if there was no property traversal involved.

Returns:
traversed property used to get to this property.

eval

Property<T> eval(Object target)
Evaluates the property reference against a target object.

Parameters:
target - target object
Returns:
property instance from the target