Package com.anylogic.engine
- java.lang.Object
- com.anylogic.engine.AgentExtensionImpl
- All Implemented Interfaces:
AgentExtension
,Serializable
- Direct Known Subclasses:
ExtAgentContinuousDelegate
,ExtAgentWithSpatialMetricsDelegate
@AnyLogicInternalAPI public abstract class AgentExtensionImpl extends Object implements AgentExtension, Serializable
Base class for extensions of
Please note that agent, during its lifetime, may change instances of some extensions (e.g. replace existing extension with its subclass), so you shouldn't store references to extensions anywhere. Please store references to
Agent
s.Please note that agent, during its lifetime, may change instances of some extensions (e.g. replace existing extension with its subclass), so you shouldn't store references to extensions anywhere. Please store references to
agent
instead.- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
AgentExtensionImpl |
Modifier and Type | Method | Description |
---|---|---|
RuntimeException | error | |
RuntimeException | error | |
Agent | getAgent() |
Returns the agent this extension belongs to
|
static Set<Class<?>> | getSupportedInterfaces_xjal |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
final AgentExtension | next_xjal() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future |
void | onDestroy() |
This method is called when the owner of this extension is destroyed.
Should be overridden when custom destroy is required. Default implementation does nothing |
void | onExtensionRemoved |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. Default implementation does nothing |
int | priority() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. This function is used for sorting extensions (in order for the overriding delegation to work) |
final void | setNext_xjal |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future |
boolean | supportsInterface_xjal |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
public AgentExtensionImpl(Agent owner)
public Agent getAgent()
Returns the agent this extension belongs to
- Specified by:
getAgent
in interfaceAgentExtension
- Returns:
- the agent this extension belongs to
@AnyLogicInternalAPI public boolean supportsInterface_xjal(Class<?> itfs)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
supportsInterface_xjal
in interfaceAgentExtension
@AnyLogicInternalAPI public static Set<Class<?>> getSupportedInterfaces_xjal(Class<? extends AgentExtension> extClass)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
public RuntimeException error(String errorText)
- See Also:
-
Utilities.error(String)
public RuntimeException error(String errorTextFormat, Object... args)
- See Also:
@AnyLogicInternalAPI public void onDestroy()
This method is called when the owner of this extension is destroyed.
Should be overridden when custom destroy is required.
Default implementation does nothing
Should be overridden when custom destroy is required.
Default implementation does nothing
- Specified by:
onDestroy
in interfaceAgentExtension
@AnyLogicInternalAPI public final AgentExtension next_xjal()
Description copied from interface:
AgentExtension
This method is internal and shouldn't be called by user.
it may be removed/renamed in future
it may be removed/renamed in future
- Specified by:
next_xjal
in interfaceAgentExtension
@AnyLogicInternalAPI public final void setNext_xjal(AgentExtension next)
Description copied from interface:
AgentExtension
This method is internal and shouldn't be called by user.
it may be removed/renamed in future
it may be removed/renamed in future
- Specified by:
setNext_xjal
in interfaceAgentExtension
@AnyLogicInternalAPI public int priority()
Description copied from interface:
AgentExtension
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
This function is used for sorting extensions (in order for the overriding delegation to work)
it may be removed/renamed in future.
This function is used for sorting extensions (in order for the overriding delegation to work)
- Specified by:
priority
in interfaceAgentExtension
- Returns:
- int value, see also
P_*
constants
@AnyLogicInternalAPI public void onExtensionRemoved(AgentExtension ext)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Default implementation does nothing
it may be removed/renamed in future.
Default implementation does nothing
- Specified by:
onExtensionRemoved
in interfaceAgentExtension
- Parameters:
ext
- the extension which has just been removed- See Also: