Package jason.asSyntax.directives
Class DefaultDirective
java.lang.Object
jason.asSyntax.directives.DefaultDirective
- All Implemented Interfaces:
Directive
public abstract class DefaultDirective extends java.lang.Object implements Directive
-
Constructor Summary
Constructors Constructor Description DefaultDirective()
-
Method Summary
Modifier and Type Method Description void
begin(Pred directive, jason.asSyntax.parser.as2j parser)
called when the directive is declaredvoid
end(Pred directive, jason.asSyntax.parser.as2j parser)
called when the directive endsboolean
isSingleton()
returns true if the same instance will be used by all agents/parsers in the JVMAgent
process(Pred directive, Agent outerContent, Agent innerContent)
This method is called to process the directive.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DefaultDirective
public DefaultDirective()
-
-
Method Details
-
isSingleton
public boolean isSingleton()Description copied from interface:Directive
returns true if the same instance will be used by all agents/parsers in the JVM- Specified by:
isSingleton
in interfaceDirective
-
begin
Description copied from interface:Directive
called when the directive is declared -
process
Description copied from interface:Directive
This method is called to process the directive.- Specified by:
process
in interfaceDirective
- Parameters:
directive
- the directive as defined in the source (e.g. "include("bla.asl")")outerContent
- the representation of the agent where the directive is being processed (the method should not change this agent state)innerContent
- the content (plans, beliefs, ...) inside the begin/end directive (as in goal patterns)- Returns:
- the agent (plans, bels, ...) with the result of the directive.
-
end
Description copied from interface:Directive
called when the directive ends
-