public class EPChainableTypeHelper extends Object
Use factory methods to initialize return type information according to the return values that your expression is going to provide.
collectionOfEvents(com.espertech.esper.common.client.EventType)
to indicate that the expression returns a collection of events.
singleEvent(com.espertech.esper.common.client.EventType)
to indicate that the expression returns a single event.
collectionOfSingleValue(EPTypeClass)
to indicate that the expression returns a collection of single values.
A single value can be any object including null.
array(EPTypeClass)
to indicate that the expression returns an array of single values.
A single value can be any object including null.
singleValue(EPType)
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.
Constructor and Description |
---|
EPChainableTypeHelper() |
Modifier and Type | Method and Description |
---|---|
static EPChainableType |
array(EPTypeClass arrayComponentType)
Indicate that the expression return type is an array of a given component type.
|
static EPChainableType |
arrayOfEvents(EventType eventTypeOfArrayEvents)
Indicate that the expression return type is an array of events of given type.
|
static EPChainableType |
collectionOfEvents(EventType eventTypeOfCollectionEvents)
Indicate that the expression return type is a collection of a given type of events.
|
static EPChainableType |
collectionOfSingleValue(EPTypeClass collectionComponentType)
Indicate that the expression return type is a collection of a given component type.
|
static EPChainableType |
fromMethod(Method method,
EPTypeClass methodTargetType)
Interrogate the provided method and determine whether it returns
single-value, array of single-value or collection of single-value and
their component type.
|
static EPTypeClass |
getCodegenReturnType(EPChainableType theType) |
static EPTypeClass |
getCollectionOrArrayComponentTypeOrNull(EPChainableType type) |
static EventType |
getEventType(EPChainableType epType) |
static EventType |
getEventTypeMultiValued(EPChainableType type) |
static EPType |
getNormalizedEPType(EPChainableType theType) |
static boolean |
isCarryEvent(EPChainableType epType) |
static EPChainableType |
nullValue() |
static EPChainableType |
optionalFromEnumerationExpr(StatementRawInfo raw,
StatementCompileTimeServices services,
ExprNode exprNode) |
static EventType |
optionalIsEventTypeColl(EPChainableType type) |
static EventType |
optionalIsEventTypeSingle(EPChainableType type) |
static EPChainableType |
singleEvent(EventType eventTypeOfSingleEvent)
Indicate that the expression return type is single event of a given event type.
|
static EPChainableType |
singleValue(Class clazz) |
static EPChainableType |
singleValue(EPType singleValueType) |
static EPChainableTypeClass |
singleValueNonNull(EPType typeClass) |
static String |
toTypeDescriptive(EPChainableType epType)
Returns a nice text detailing the expression result type.
|
public static EventType getEventTypeMultiValued(EPChainableType type)
public static EPTypeClass getCollectionOrArrayComponentTypeOrNull(EPChainableType type)
public static boolean isCarryEvent(EPChainableType epType)
public static EventType getEventType(EPChainableType epType)
public static EPChainableType array(EPTypeClass arrayComponentType)
arrayComponentType
- array component typepublic static EPChainableTypeClass singleValueNonNull(EPType typeClass)
public static EPChainableType singleValue(EPType singleValueType)
public static EPChainableType singleValue(Class clazz)
public static EPChainableType nullValue()
public static EPChainableType collectionOfSingleValue(EPTypeClass collectionComponentType)
collectionComponentType
- collection component typepublic static EPChainableType collectionOfEvents(EventType eventTypeOfCollectionEvents)
eventTypeOfCollectionEvents
- the event type of the events that are part of the collectionpublic static EPChainableType arrayOfEvents(EventType eventTypeOfArrayEvents)
eventTypeOfArrayEvents
- the event type of the events that are part of the arraypublic static EPChainableType singleEvent(EventType eventTypeOfSingleEvent)
eventTypeOfSingleEvent
- the event type of the event returnedpublic static EPChainableType fromMethod(Method method, EPTypeClass methodTargetType)
method
- the class methodsmethodTargetType
- method target class if availablepublic static String toTypeDescriptive(EPChainableType epType)
epType
- typepublic static EPType getNormalizedEPType(EPChainableType theType)
public static EPTypeClass getCodegenReturnType(EPChainableType theType)
public static EPChainableType optionalFromEnumerationExpr(StatementRawInfo raw, StatementCompileTimeServices services, ExprNode exprNode) throws ExprValidationException
ExprValidationException
public static EventType optionalIsEventTypeColl(EPChainableType type)
public static EventType optionalIsEventTypeSingle(EPChainableType type)
Copyright © 2005–2021. All rights reserved.