Package jadex.rules.parser.conditions
Class SConditions
- java.lang.Object
-
- jadex.rules.parser.conditions.SConditions
-
public class SConditions extends java.lang.Object
Static helper methods for conditions parser.
-
-
Constructor Summary
Constructors Constructor Description SConditions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static void
adaptConditionType(Variable var, OAVObjectType type)
protected static java.lang.Object
convertAttributeTypes(OAVTypeModel tmodel, OAVObjectType otype, java.lang.String slotname, java.lang.String[] imports)
Convert slot name(s) to attribute(s) types.protected static MethodCall
createMethodCall(OAVObjectType otype, java.lang.String name, java.util.List params)
protected static OAVObjectType
getObjectType(OAVTypeModel tmodel, java.lang.String typename, java.lang.String[] imports)
Get an object type while considering imports for Java types.protected static OAVObjectType
getValueSourceType(OAVTypeModel tmodel, java.lang.Object valuesource)
protected static boolean
lookaheadFunctionCall(org.antlr.runtime.TokenStream input)
Lookahead for an function call.protected static boolean
lookaheadObjectCE(org.antlr.runtime.TokenStream input)
Lookahead for an object condition.
-
-
-
Method Detail
-
adaptConditionType
protected static void adaptConditionType(Variable var, OAVObjectType type)
- Parameters:
var
-type
-
-
createMethodCall
protected static MethodCall createMethodCall(OAVObjectType otype, java.lang.String name, java.util.List params)
- Parameters:
otype
-name
-params
-- Returns:
-
getValueSourceType
protected static OAVObjectType getValueSourceType(OAVTypeModel tmodel, java.lang.Object valuesource)
- Parameters:
tmodel
-valuesource
-- Returns:
-
lookaheadObjectCE
protected static boolean lookaheadObjectCE(org.antlr.runtime.TokenStream input)
Lookahead for an object condition. Excludes (and ...) (not ...) (test ...) conditions but allows (test.MyObject ...) object conditions.
-
lookaheadFunctionCall
protected static boolean lookaheadFunctionCall(org.antlr.runtime.TokenStream input)
Lookahead for an function call. Excludes (contains ...) (excludes ...) conditions but allows (contains.MyObject ...) function calls.
-
convertAttributeTypes
protected static java.lang.Object convertAttributeTypes(OAVTypeModel tmodel, OAVObjectType otype, java.lang.String slotname, java.lang.String[] imports)
Convert slot name(s) to attribute(s) types.- Parameters:
otype
- The object type.slotname
- The slotname string.- Returns:
- The attribute type or an array of attribute types.
-
getObjectType
protected static OAVObjectType getObjectType(OAVTypeModel tmodel, java.lang.String typename, java.lang.String[] imports)
Get an object type while considering imports for Java types.- Parameters:
tmodel
- The type model.typename
- The name of the type to search for.imports
- The imports (if any).loader
- The class loader.- Returns:
- The type.
-
-