|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.client.util.ExpressionReturnType
public class ExpressionReturnType
Carries return type information related to the return values returned by expressions.
Use factory methods to initialize return type information according to the return values that your expression is going to provide.
collectionOfEvents(com.espertech.esper.client.EventType)
to indicate that the expression returns a collection of events.
singleEvent(com.espertech.esper.client.EventType)
to indicate that the expression returns a single event.
collectionOfSingleValue(Class)
to indicate that the expression returns a collection of single values.
A single value can be any object including null.
array(Class)
to indicate that the expression returns an array of single values.
A single value can be any object including null.
singleValue(Class)
to indicate that the expression returns a single value.
A single value can be any object including null.
Such expression results cannot be used as input to enumeration methods, for example.
Method Summary | |
---|---|
static ExpressionReturnType |
array(java.lang.Class arrayComponentType)
Indicate that the expression return type is an array of a given component type. |
static ExpressionReturnType |
collectionOfEvents(EventType eventTypeOfCollectionEvents)
Indicate that the expression return type is a collection of a given type of events. |
static ExpressionReturnType |
collectionOfSingleValue(java.lang.Class collectionComponentType)
Indicate that the expression return type is a collection of a given component type. |
static ExpressionReturnType |
fromMethod(java.lang.reflect.Method method)
Interrogate the provided method and determine whether it returns single-value, array of single-value or collection of single-value and their component type. |
EventType |
getCollOfEventEventType()
Returns the event type of the collection of events returned by the expression, or null if the expression does not return a collection of events. |
java.lang.Class |
getComponentType()
Returns the type of the component-type returned by an expression, if there is a component type. |
EventType |
getSingleEventEventType()
Returns the event type of the event returned by the expression, or null if the expression does not return a single event. |
java.lang.Class |
getSingleValueType()
Returns the type of the single-value returned by an expression. |
boolean |
isSingleValueNonNull()
Returns an indicator whether the expression returns a non-null single-value. |
static ExpressionReturnType |
singleEvent(EventType eventTypeOfSingleEvent)
Indicate that the expression return type is single event of a given event type. |
static ExpressionReturnType |
singleValue(java.lang.Class singleValueType)
Indicate that the expression return type is a single (non-enumerable) value of the given type. |
java.lang.String |
toTypeDescriptive()
Returns a nice text detailing the expression result type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ExpressionReturnType array(java.lang.Class arrayComponentType)
arrayComponentType
- array component type
public static ExpressionReturnType singleValue(java.lang.Class singleValueType)
singleValueType
- type of single value returned, or null to indicate that the expression always returns null
public static ExpressionReturnType collectionOfSingleValue(java.lang.Class collectionComponentType)
collectionComponentType
- collection component type
public static ExpressionReturnType collectionOfEvents(EventType eventTypeOfCollectionEvents)
eventTypeOfCollectionEvents
- the event type of the events that are part of the collection
public static ExpressionReturnType singleEvent(EventType eventTypeOfSingleEvent)
eventTypeOfSingleEvent
- the event type of the event returned
public java.lang.Class getSingleValueType()
For expressions that return a collection of single values, this method returns Collection.class
.
For expressions that return an array of single values, this method returns the array type of the component type.
For expressions that return a single event, returns the underlying type of the event type.
For expressions that return a collection of events, return array type of the underlying type of the event type.
Can return null for expressions that always return null.
public java.lang.Class getComponentType()
Returns null for single-event or collection-of-events return type.
Returns null for single-value types that are not declared explicitly as an array or collection.
For array and collection returns the component type of the collection.
public EventType getSingleEventEventType()
public EventType getCollOfEventEventType()
public boolean isSingleValueNonNull()
public static ExpressionReturnType fromMethod(java.lang.reflect.Method method)
method
- the class methods
public java.lang.String toTypeDescriptive()
|
© 2006-2011 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |