net.sf.sasl.language.placeholder.aop.interpreter
Interface IEnvironment

All Known Implementing Classes:
Environment

public interface IEnvironment

Interfaces defines methods that an interpreter offers placeholders on calling them.

Since:
0.0.1 (sasl-common-aspect-library)
Author:
Philipp Förmer

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 setEnvironmentProperty(String key, Object value)
          Sets a shared object to the over given key that is offered by the interpreter environment.
 

Method Detail

getTargetObject

Object getTargetObject()
Returns the target object of a method invocation.

Returns:
non null
Since:
0.0.1 (sasl-common-aspect-library)

getTargetMethod

Method getTargetMethod()
Returns the target method of a method invocation.

Returns:
non null
Since:
0.0.1 (sasl-common-aspect-library)

getTargetArguments

Object[] getTargetArguments()
Returns the target arguments of a method invocation.

Returns:
non null
Since:
0.0.1 (sasl-common-aspect-library)

getTargetReturnValue

Object getTargetReturnValue()
Returns the target return value of a method invocation. If the getExecutionPhase() does not return INVOCATION than it will return definitely null.

Returns:
null or non null.
Since:
0.0.1 (sasl-common-aspect-library)

getOccurredException

Throwable getOccurredException()
Returns the occurred exception of the target method invocation. Only returns non null if the getExecutionPhase() returns EXCEPTION.

Returns:
null or non null.
Since:
0.0.1 (sasl-common-aspect-library)

getExecutionPhase

TargetMethodExecutionPhase getExecutionPhase()
Returns the execution phase of the target method to which this environment belongs.

Returns:
non null.
Since:
0.0.1 (sasl-common-aspect-library)

getInterpreter

IInterpreter getInterpreter()
Returns the interpreter which interprets a placeholder script for the current environment. Could be used for callbacks.

Returns:
non null.
Since:
0.0.1 (sasl-common-aspect-library)

getEnvironmentProperty

Object getEnvironmentProperty(String key)
Returns a shared object to the over given key that is offered by the interpreter environment.

Parameters:
key - null or non null
Returns:
null or non null shared object instance.
Since:
0.0.1 (sasl-common-aspect-library)

setEnvironmentProperty

void setEnvironmentProperty(String key,
                            Object value)
Sets a shared object to the over given key that is offered by the interpreter environment.

Parameters:
key - null or non null.
value - null or non null.
Since:
0.0.2 (sasl-common-aspect-library)

getEnvironmentProperties

Map<String,Object> getEnvironmentProperties()
Returns a map of shared properties of the interpreter environment.

Returns:
non null
Since:
0.0.1 (sasl-common-aspect-library)


Copyright © 2010. All Rights Reserved.