Package jadex.bdi.model
Class ByteKeepingASMBDIClassGenerator
java.lang.Object
jadex.bdi.model.AbstractAsmBdiClassGenerator
jadex.bdi.model.ASMBDIClassGenerator
jadex.bdi.model.ByteKeepingASMBDIClassGenerator
- All Implemented Interfaces:
IBDIClassGenerator
This class generator keeps generated byte-code as byte[] to be post-processed
by other classes. Currently, this is used by compile-time BDI-enhancing with
maven/gradle-plugins (for android).
-
Nested Class Summary
Nested classes/interfaces inherited from class jadex.bdi.model.AbstractAsmBdiClassGenerator
AbstractAsmBdiClassGenerator.MethodBeliefs
-
Field Summary
Fields inherited from class jadex.bdi.model.AbstractAsmBdiClassGenerator
nodehelper, ophelper
Fields inherited from interface jadex.bdi.model.IBDIClassGenerator
AGENT_FIELD_NAME, DYNAMIC_BELIEF_UPDATEMETHOD_PREFIX, GLOBALNAME_FIELD_NAME, INIT_EXPRESSIONS_METHOD_PREFIX, INITARGS_FIELD_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear the list of recently generated classes.Get the recently generated classes as byte array.Class
<?> toClass
(String name, byte[] data, ClassLoader loader, ProtectionDomain domain) Transform byte Array into Class and define it in classloader.Methods inherited from class jadex.bdi.model.ASMBDIClassGenerator
enhanceSetter, findBeliefs, findParameters, generateBDIClass, generateBDIClass, replaceNativeGetter, replaceNativeSetter, toClass, transformArrayStores, transformConstructor
Methods inherited from class jadex.bdi.model.AbstractAsmBdiClassGenerator
addBeliefEventsToConditions, findMethodBelief, getGoal, isAgentClass, isAgentOrCapa, isGoal, isGoalClass, isPlan, isPlanClass, isPlanMethod, transformClassNode
-
Constructor Details
-
ByteKeepingASMBDIClassGenerator
public ByteKeepingASMBDIClassGenerator()Create a new generator.
-
-
Method Details
-
toClass
Description copied from class:ASMBDIClassGenerator
Transform byte Array into Class and define it in classloader.- Overrides:
toClass
in classASMBDIClassGenerator
- Returns:
- the loaded class or
null
, if the class is not valid, such as Map.entry "inner Classes".
-
getRecentClassBytes
Get the recently generated classes as byte array.- Returns:
- recently generated classes
-
clearRecentClassBytes
public void clearRecentClassBytes()Clear the list of recently generated classes.
-