net.esper.event
Class EventPropertyDescriptor

java.lang.Object
  extended by net.esper.event.EventPropertyDescriptor

public class EventPropertyDescriptor
extends Object

Encapsulates the event property information available after introspecting an event's class members for getter methods.


Constructor Summary
EventPropertyDescriptor(String propertyName, String listedName, Field accessorField, EventPropertyType propertyType)
          Ctor.
EventPropertyDescriptor(String propertyName, String listedName, Method readMethod, EventPropertyType propertyType)
          Ctor.
 
Method Summary
 boolean equals(Object other)
           
 Field getAccessorField()
          Returns the accessor field.
 String getListedName()
          Returns the listed name, which is the name the property would show up as when asking an event type for the set of valid properties.
 String getPropertyName()
          Return the property name, for mapped and indexed properties this is just the property name without parantheses or brackets.
 EventPropertyType getPropertyType()
          Returns an enum indicating the type of property: simple, mapped, indexed.
 Method getReadMethod()
          Returns the read method.
 Class getReturnType()
          Returns the type of the underlying method or field of the event property.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventPropertyDescriptor

public EventPropertyDescriptor(String propertyName,
                               String listedName,
                               Method readMethod,
                               EventPropertyType propertyType)
Ctor.

Parameters:
propertyName - - name of property, from getter method
listedName - - name the property may show up when listed as a valid property, such as indexed[], mapped()
readMethod - - read method to get value
propertyType - - type of property

EventPropertyDescriptor

public EventPropertyDescriptor(String propertyName,
                               String listedName,
                               Field accessorField,
                               EventPropertyType propertyType)
Ctor.

Parameters:
propertyName - - name of property, from getter method
listedName - - name the property may show up when listed as a valid property, such as indexed[], mapped()
accessorField - - field to get value from
propertyType - - type of property
Method Detail

getPropertyName

public String getPropertyName()
Return the property name, for mapped and indexed properties this is just the property name without parantheses or brackets.

Returns:
property name

getListedName

public String getListedName()
Returns the listed name, which is the name the property would show up as when asking an event type for the set of valid properties. The listed name for indexed properties is "name[]" since an index is required for valid property access. The listed name for mapped properties is "name()".

Returns:
listed name

getPropertyType

public EventPropertyType getPropertyType()
Returns an enum indicating the type of property: simple, mapped, indexed.

Returns:
enum with property type info

getReadMethod

public Method getReadMethod()
Returns the read method. Can return null if the property is backed by a field..

Returns:
read method of null if field property

getAccessorField

public Field getAccessorField()
Returns the accessor field. Can return null if the property is backed by a method.

Returns:
accessor field of null if method property

getReturnType

public Class getReturnType()
Returns the type of the underlying method or field of the event property.

Returns:
return type

toString

public String toString()
Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object