Package de.uni_hildesheim.sse
Class VilExpressionParser
- java.lang.Object
-
- net.ssehub.easy.basics.modelManagement.AbstractModelInitializer<Script>
-
- de.uni_hildesheim.sse.VilExpressionParser
-
- All Implemented Interfaces:
ModelInitializer.IModelInitializer,IExpressionParser<Resolver>
public class VilExpressionParser extends AbstractModelInitializer<Script> implements IExpressionParser<Resolver>
Provides an expression parser for VIL.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description VilExpressionParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivate(org.osgi.service.component.ComponentContext context)Private method to activate plugin.protected voiddeactivate(org.osgi.service.component.ComponentContext context)Private method to to de-activate plugin.protected IModelLoader<Script>getModelLoader()Returns the actual model loader.ModelManagement<Script>getModelManagement()Returns the actual model management instance.Expressionparse(java.lang.String text, Resolver resolver)Parses the given text into an expression.Expressionparse(java.lang.String text, IRuntimeEnvironment environment)Parses the given text into an expression.static VilExpressionParserregister()Registers the expression parser in case that VIL shall be used without Eclipse-DS initialization.static voidunregister(VilExpressionParser parser)Unregisters the parser obtained fromregister().-
Methods inherited from class net.ssehub.easy.basics.modelManagement.AbstractModelInitializer
addLocation, addLocationToFront, registerLoader, removeLocation, stripFile, unregisterLoader
-
-
-
-
Method Detail
-
register
public static VilExpressionParser register()
Registers the expression parser in case that VIL shall be used without Eclipse-DS initialization. Do not call this method within Eclipse.- Returns:
- the registered instance (for
unregister(VilExpressionParser))
-
unregister
public static void unregister(VilExpressionParser parser)
Unregisters the parser obtained fromregister().- Parameters:
parser- the parser to unregister
-
activate
protected void activate(org.osgi.service.component.ComponentContext context)
Private method to activate plugin.- Parameters:
context- Context.
-
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext context)
Private method to to de-activate plugin.- Parameters:
context- Context.
-
parse
public Expression parse(java.lang.String text, IRuntimeEnvironment environment) throws VilException
Description copied from interface:IExpressionParserParses the given text into an expression. Resolution will happen in a separate resolver instance.- Specified by:
parsein interfaceIExpressionParser<Resolver>- Parameters:
text- the text to be parsedenvironment- the runtime environment used to resolve variables- Returns:
- the parsed expression
- Throws:
VilException- in case of parse problems
-
parse
public Expression parse(java.lang.String text, Resolver resolver) throws VilException
Description copied from interface:IExpressionParserParses the given text into an expression. Resolution will happen in the given resolver instance.- Specified by:
parsein interfaceIExpressionParser<Resolver>- Parameters:
text- the text to be parsedresolver- a resolver instance providing a parse environment consisting of variables- Returns:
- the parsed expression
- Throws:
VilException- in case of parse problems
-
getModelManagement
public ModelManagement<Script> getModelManagement()
Description copied from class:AbstractModelInitializerReturns the actual model management instance.- Specified by:
getModelManagementin classAbstractModelInitializer<Script>- Returns:
- the model management instance
-
getModelLoader
protected IModelLoader<Script> getModelLoader()
Description copied from class:AbstractModelInitializerReturns the actual model loader.- Specified by:
getModelLoaderin classAbstractModelInitializer<Script>- Returns:
- the model loader (may be null if registration of the loader is done differently)
-
-