Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LOCAL_PREFIX |
private java.util.Map<Atom,Atom> |
localNSs |
(package private) static java.util.logging.Logger |
logger |
private static java.util.concurrent.atomic.AtomicInteger |
nsCounter |
(package private) java.util.Stack<Atom> |
oldNS |
Constructor and Description |
---|
NameSpace() |
Modifier and Type | Method and Description |
---|---|
private Atom |
addLocalNS(Atom ns) |
void |
begin(Pred directive,
as2j parser)
called when the directive is declared
|
void |
end(Pred directive,
as2j parser)
called when the directive ends
|
static int |
getUniqueID() |
boolean |
isLocalNS(Atom ns) |
boolean |
isSingleton()
returns true if the same instance will be used by all agents/parsers in the JVM
|
Atom |
map(Atom ns) |
Agent |
process(Pred directive,
Agent outerContent,
Agent innerContent)
This method is called to process the directive.
|
public static final java.lang.String LOCAL_PREFIX
static java.util.logging.Logger logger
java.util.Stack<Atom> oldNS
private static java.util.concurrent.atomic.AtomicInteger nsCounter
public boolean isSingleton()
Directive
isSingleton
in interface Directive
public Agent process(Pred directive, Agent outerContent, Agent innerContent)
Directive
process
in interface Directive
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)public void begin(Pred directive, as2j parser)
Directive
public void end(Pred directive, as2j parser)
Directive
public boolean isLocalNS(Atom ns)
public static int getUniqueID()