|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.sasl.language.placeholder.aop.interpreter.Environment
public class Environment
Default implementation of the environment interface. Does not guarantee on its own the the contract conditions of the interface.
Constructor Summary | |
---|---|
Environment(IInterpreter interpreter)
Creates an environment object that belongs to the given interpreter. |
Method Summary | |
---|---|
Map<String,Object> |
getEnvironmentProperties()
Returns a map of shared properties of the interpreter environment. |
Object |
getEnvironmentProperty(String key)
Returns a shared object to the over given key that is offered by the interpreter environment. |
TargetMethodExecutionPhase |
getExecutionPhase()
Returns the execution phase of the target method to which this environment belongs. |
IInterpreter |
getInterpreter()
Returns the interpreter which interprets a placeholder script for the current environment. |
Throwable |
getOccurredException()
Returns the occurred exception of the target method invocation. |
Object[] |
getTargetArguments()
Returns the target arguments of a method invocation. |
Method |
getTargetMethod()
Returns the target method of a method invocation. |
Object |
getTargetObject()
Returns the target object of a method invocation. |
Object |
getTargetReturnValue()
Returns the target return value of a method invocation. |
void |
setEnvironmentProperties(Map<String,Object> properties)
Overrides the shared property map with th given property map. |
void |
setEnvironmentProperty(String key,
Object value)
Sets a shared property of the interpreter environment. |
void |
setExecutionPhase(TargetMethodExecutionPhase executionPhase)
Sets the execution phase to which this environment belongs. |
void |
setInterpreter(IInterpreter interpreter)
Sets the interpreter to which this environment belongs. |
void |
setOccurredException(Throwable occuredException)
Sets the occured exception that occured during the target method invocation. |
void |
setTargetArguments(Object[] targetArguments)
Sets the target arguments of the target method invocation. |
void |
setTargetMethod(Method targetMethod)
Sets the target method which gets or was called. |
void |
setTargetObject(Object targetObject)
Sets the target object on which the target method gets or was invoked. |
void |
setTargetReturnValue(Object targetReturnValue)
Sets the return value of the target method invocation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Environment(IInterpreter interpreter)
interpreter
- null or non null.Method Detail |
---|
public TargetMethodExecutionPhase getExecutionPhase()
IEnvironment
getExecutionPhase
in interface IEnvironment
net.sf.sasl.language.placeholder.interpreter.IEnvironment#getExecutionPhase()
public IInterpreter getInterpreter()
IEnvironment
getInterpreter
in interface IEnvironment
net.sf.sasl.language.placeholder.interpreter.IEnvironment#getInterpreter()
public Throwable getOccurredException()
IEnvironment
IEnvironment.getExecutionPhase()
returns
EXCEPTION
.
getOccurredException
in interface IEnvironment
net.sf.sasl.language.placeholder.interpreter.IEnvironment#getOccuredException()
public Object[] getTargetArguments()
IEnvironment
getTargetArguments
in interface IEnvironment
net.sf.sasl.language.placeholder.interpreter.IEnvironment#getTargetArguments()
public Method getTargetMethod()
IEnvironment
getTargetMethod
in interface IEnvironment
net.sf.sasl.language.placeholder.interpreter.IEnvironment#getTargetMethod()
public Object getTargetObject()
IEnvironment
getTargetObject
in interface IEnvironment
net.sf.sasl.language.placeholder.interpreter.IEnvironment#getTargetObject()
public Object getTargetReturnValue()
IEnvironment
IEnvironment.getExecutionPhase()
does not return
INVOCATION
than it will return definitely null.
getTargetReturnValue
in interface IEnvironment
net.sf.sasl.language.placeholder.interpreter.IEnvironment#getTargetReturnValue()
public void setExecutionPhase(TargetMethodExecutionPhase executionPhase)
executionPhase
- null or non null.public void setInterpreter(IInterpreter interpreter)
interpreter
- null or non null.public void setOccurredException(Throwable occuredException)
occuredException
- null or non null.public void setTargetArguments(Object[] targetArguments)
targetArguments
- null or non null.public void setTargetMethod(Method targetMethod)
targetMethod
- null or non null.public void setTargetObject(Object targetObject)
targetObject
- null or non null.public void setTargetReturnValue(Object targetReturnValue)
targetReturnValue
- null or non null.public Object getEnvironmentProperty(String key)
IEnvironment
getEnvironmentProperty
in interface IEnvironment
key
- null or non null
net.sf.sasl.language.placeholder.interpreter.IEnvironment#getEnvironmentProperty(java.lang.String)
public void setEnvironmentProperty(String key, Object value)
setEnvironmentProperty
in interface IEnvironment
key
- null or non null key under which the value is accessible.value
- null or non nullpublic void setEnvironmentProperties(Map<String,Object> properties)
properties
- null or non nullpublic Map<String,Object> getEnvironmentProperties()
IEnvironment
getEnvironmentProperties
in interface IEnvironment
net.sf.sasl.language.placeholder.interpreter.IEnvironment#getEnvironmentProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |