Class DefaultParserHelper
- java.lang.Object
- 
- jadex.rules.parser.conditions.javagrammar.DefaultParserHelper
 
- 
- All Implemented Interfaces:
- IParserHelper
 
 public class DefaultParserHelper extends java.lang.Object implements IParserHelper Basic handler for context specific parsing issues.
- 
- 
Field SummaryFields Modifier and Type Field Description protected BuildContextcontextThe build context.
 - 
Constructor SummaryConstructors Constructor Description DefaultParserHelper(ICondition condition, OAVTypeModel tmodel)Create a BDI parser helper.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddVariable(Variable var)Add a variable.BuildContextgetBuildContext()Get the build context.java.util.ListgetConditions()Get the conditions after parsing.java.lang.Object[]getReplacementType(OAVObjectType type)Get the replacement type for an object type in an existential declaration E.g.VariablegetVariable(java.lang.String name)Get a variable with a given name.booleanisPseudoVariable(java.lang.String name)Test, if a name refers to a pseudo variable (e.g.
 
- 
- 
- 
Field Detail- 
contextprotected BuildContext context The build context.
 
- 
 - 
Constructor Detail- 
DefaultParserHelperpublic DefaultParserHelper(ICondition condition, OAVTypeModel tmodel) Create a BDI parser helper.- Parameters:
- condition- The predefined condition.
- state- The state.
- returnvar- The return value variable (if return value condition).
 
 
- 
 - 
Method Detail- 
getVariablepublic Variable getVariable(java.lang.String name) Get a variable with a given name.- Specified by:
- getVariablein interface- IParserHelper
- Parameters:
- name- The variable name.
- Returns:
- The variable.
 
 - 
addVariablepublic void addVariable(Variable var) Add a variable.- Specified by:
- addVariablein interface- IParserHelper
- Parameters:
- var- The variable.
 
 - 
isPseudoVariablepublic boolean isPseudoVariable(java.lang.String name) Test, if a name refers to a pseudo variable (e.g. $beliefbase).- Specified by:
- isPseudoVariablein interface- IParserHelper
- Parameters:
- name- The variable name.
- Returns:
- True, if the name is a pseudo variable.
 
 - 
getConditionspublic java.util.List getConditions() Get the conditions after parsing.- Specified by:
- getConditionsin interface- IParserHelper
 
 - 
getBuildContextpublic BuildContext getBuildContext() Get the build context.- Specified by:
- getBuildContextin interface- IParserHelper
 
 - 
getReplacementTypepublic java.lang.Object[] getReplacementType(OAVObjectType type) Get the replacement type for an object type in an existential declaration E.g. when a flyweight should be replaced by the real state type (IGoal $g instead of goal $g)- Specified by:
- getReplacementTypein interface- IParserHelper
- Parameters:
- type- The type to be replaced.
- Returns:
- a tuple containing the replacement type and the replacement value source (e.g. a function call recreating the flyweight from the state object).
 
 
- 
 
-