jadex.micro.testcases.features.CustomFeatureAgent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-micro Show documentation
Show all versions of jadex-applications-micro Show documentation
The Jadex micro applications package contains several example applications, benchmarks and testcases using micro agents.
package jadex.micro.testcases.features;
import jadex.bridge.IInternalAccess;
import jadex.micro.annotation.Agent;
import jadex.micro.annotation.AgentCreated;
import jadex.micro.annotation.Feature;
import jadex.micro.annotation.Features;
/**
* Agent testing incorporation of an additional feature.
*/
@Agent
@Features(additional=true,
value=@Feature(type=ICustomFeature.class, clazz=CustomFeature.class))
public class CustomFeatureAgent
{
@Agent
protected IInternalAccess agent;
@AgentCreated
public void hello()
{
System.out.println(agent+" "+agent.getComponentFeature(ICustomFeature.class).someMethod());
}
}