LightJason - AgentSpeak(L++)
org.lightjason.agentspeak.action.binding.CMethodAction Class Reference

action for binding a method. More...

+ Inheritance diagram for org.lightjason.agentspeak.action.binding.CMethodAction:
+ Collaboration diagram for org.lightjason.agentspeak.action.binding.CMethodAction:

Public Member Functions

 CMethodAction ( @Nonnull final Method p_method) throws IllegalAccessException
 ctor More...
 
IFuzzyValue< Boolean > execute (final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
 defines a plan-body operation More...
 
final int minimalArgumentNumber ()
 minimum number of arguments More...
 
final IPath name ()
 returns the name with path of the action More...
 
- Public Member Functions inherited from org.lightjason.agentspeak.action.IBaseAction
final boolean equals (final Object p_object)
 
final int hashCode ()
 
final String toString ()
 
- Public Member Functions inherited from org.lightjason.agentspeak.action.IAction
default Stream< IVariable<?> > variables ()
 returns a stream with all used variables More...
 

Private Member Functions

void readObject (final ObjectInputStream p_stream) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException
 deserializable call More...
 
void writeObject (final ObjectOutputStream p_stream) throws IOException
 serialize call More...
 

Static Private Member Functions

static IFuzzyValue< Boolean > returnvalues ( @Nullable final Object p_result, @Nonnull final List< ITerm > p_return)
 creates the returns values of the execution More...
 

Private Attributes

final int m_arguments
 number of arguments More...
 
transient Method m_method
 method reference More...
 
transient MethodHandle m_methodhandle
 method handle More...
 
final IPath m_name
 name of the action More...
 

Static Private Attributes

static final long serialVersionUID = -507236338411690842L
 serial id More...
 

Additional Inherited Members

- Public Attributes inherited from org.lightjason.agentspeak.action.IAction
long serialVersionUID = -6374480398439703170L
 serial id More...
 
- Static Protected Attributes inherited from org.lightjason.agentspeak.action.IBaseAction
static final Logger LOGGER = org.lightjason.agentspeak.common.CCommon.logger( IAction.class )
 logger More...
 

Detailed Description

action uses agent for object binding

Definition at line 56 of file CMethodAction.java.

Constructor & Destructor Documentation

◆ CMethodAction()

org.lightjason.agentspeak.action.binding.CMethodAction.CMethodAction ( @Nonnull final Method  p_method) throws IllegalAccessException
Parameters
p_methodmethod reference
Exceptions
IllegalAccessExceptionon method access error

Definition at line 86 of file CMethodAction.java.

References org.lightjason.agentspeak.common.CPath.from().

+ Here is the call graph for this function:

Member Function Documentation

◆ execute()

IFuzzyValue<Boolean> org.lightjason.agentspeak.action.binding.CMethodAction.execute ( final boolean  p_parallel,
@Nonnull final IContext  p_context,
@Nonnull final List< ITerm p_argument,
@Nonnull final List< ITerm p_return 
)
Parameters
p_parallelparallel execution
p_contextcurrent execution context
p_argumentparameter of the action
p_returnreturn values
Returns
fuzzy boolean

Implements org.lightjason.agentspeak.language.execution.IExecution.

Definition at line 149 of file CMethodAction.java.

References org.lightjason.agentspeak.language.fuzzy.CFuzzyValue< T >.from(), org.lightjason.agentspeak.action.IBaseAction.LOGGER, org.lightjason.agentspeak.action.binding.CMethodAction.m_arguments, org.lightjason.agentspeak.action.binding.CMethodAction.m_methodhandle, org.lightjason.agentspeak.action.binding.CMethodAction.m_name, org.lightjason.agentspeak.language.ITerm.raw(), and org.lightjason.agentspeak.action.binding.CMethodAction.returnvalues().

+ Here is the call graph for this function:

◆ minimalArgumentNumber()

final int org.lightjason.agentspeak.action.binding.CMethodAction.minimalArgumentNumber ( )
Returns
number of minimal arguments

Implements org.lightjason.agentspeak.action.IAction.

Definition at line 142 of file CMethodAction.java.

References org.lightjason.agentspeak.action.binding.CMethodAction.m_arguments.

◆ name()

final IPath org.lightjason.agentspeak.action.binding.CMethodAction.name ( )
Returns
path (literal functor)

Implements org.lightjason.agentspeak.action.IAction.

Definition at line 135 of file CMethodAction.java.

References org.lightjason.agentspeak.action.binding.CMethodAction.m_name.

◆ readObject()

void org.lightjason.agentspeak.action.binding.CMethodAction.readObject ( final ObjectInputStream  p_stream) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException
private
Parameters
p_streamobject stream
Exceptions
IOExceptionis thrown on io error
ClassNotFoundExceptionis thrown on deserialization error
NoSuchMethodExceptionis thrown on method deserialization
IllegalAccessExceptionis thrown on creating method handle

Definition at line 124 of file CMethodAction.java.

◆ returnvalues()

static IFuzzyValue<Boolean> org.lightjason.agentspeak.action.binding.CMethodAction.returnvalues ( @Nullable final Object  p_result,
@Nonnull final List< ITerm p_return 
)
staticprivate
Parameters
p_resultreturn object of the invoke call
p_returnreturn argument list
Returns
execution return

Definition at line 187 of file CMethodAction.java.

References org.lightjason.agentspeak.action.IBaseAction.equals(), org.lightjason.agentspeak.language.CRawTerm< T >.from(), and org.lightjason.agentspeak.language.fuzzy.CFuzzyValue< T >.from().

Referenced by org.lightjason.agentspeak.action.binding.CMethodAction.execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeObject()

void org.lightjason.agentspeak.action.binding.CMethodAction.writeObject ( final ObjectOutputStream  p_stream) throws IOException
private
Parameters
p_streamobject stream
Exceptions
IOExceptionerror on writing object data

Definition at line 104 of file CMethodAction.java.

Member Data Documentation

◆ m_arguments

final int org.lightjason.agentspeak.action.binding.CMethodAction.m_arguments
private

◆ m_method

transient Method org.lightjason.agentspeak.action.binding.CMethodAction.m_method
private

Definition at line 73 of file CMethodAction.java.

◆ m_methodhandle

transient MethodHandle org.lightjason.agentspeak.action.binding.CMethodAction.m_methodhandle
private

◆ m_name

final IPath org.lightjason.agentspeak.action.binding.CMethodAction.m_name
private

◆ serialVersionUID

final long org.lightjason.agentspeak.action.binding.CMethodAction.serialVersionUID = -507236338411690842L
staticprivate

Definition at line 61 of file CMethodAction.java.