Package jadex.bdiv3
Class ByteKeepingASMBDIClassGenerator
- java.lang.Object
-
- jadex.bdiv3.AbstractAsmBdiClassGenerator
-
- jadex.bdiv3.ASMBDIClassGenerator
-
- jadex.bdiv3.ByteKeepingASMBDIClassGenerator
-
- All Implemented Interfaces:
IBDIClassGenerator
public class ByteKeepingASMBDIClassGenerator extends ASMBDIClassGenerator
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.bdiv3.AbstractAsmBdiClassGenerator
AbstractAsmBdiClassGenerator.MethodBeliefs
-
-
Field Summary
-
Fields inherited from class jadex.bdiv3.AbstractAsmBdiClassGenerator
nodehelper, ophelper
-
Fields inherited from interface jadex.bdiv3.IBDIClassGenerator
AGENT_FIELD_NAME, DYNAMIC_BELIEF_UPDATEMETHOD_PREFIX, GLOBALNAME_FIELD_NAME, INIT_EXPRESSIONS_METHOD_PREFIX
-
-
Constructor Summary
Constructors Constructor Description ByteKeepingASMBDIClassGenerator()
Create a new generator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearRecentClassBytes()
Clear the list of recently generated classes.java.util.Map<java.lang.String,byte[]>
getRecentClassBytes()
Get the recently generated classes as byte array.java.lang.Class<?>
toClass(java.lang.String name, byte[] data, java.lang.ClassLoader loader, java.security.ProtectionDomain domain)
Transform byte Array into Class and define it in classloader.-
Methods inherited from class jadex.bdiv3.ASMBDIClassGenerator
enhanceSetter, findBeliefs, findParameters, generateBDIClass, generateBDIClass, main, replaceNativeGetter, replaceNativeSetter, toClass, transformArrayStores, transformConstructor
-
Methods inherited from class jadex.bdiv3.AbstractAsmBdiClassGenerator
addBeliefEventsToConditions, checkEnhanced, findMethodBelief, getGoal, isAgentClass, isAgentOrCapa, isEnhanced, isEnhanced, isGoal, isGoalClass, isPlan, isPlanClass, isPlanMethod, transformClassNode
-
-
-
-
Method Detail
-
toClass
public java.lang.Class<?> toClass(java.lang.String name, byte[] data, java.lang.ClassLoader loader, java.security.ProtectionDomain domain)
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
public java.util.Map<java.lang.String,byte[]> getRecentClassBytes()
Get the recently generated classes as byte array.- Returns:
- recently generated classes
-
clearRecentClassBytes
public void clearRecentClassBytes()
Clear the list of recently generated classes.
-
-