Class StubByteCodeManager


  • public final class StubByteCodeManager
    extends Object
    This class is responsible to manage bytecode of stubs (create stubs).
    • Method Detail

      • generateJavaStub

        public static byte[] generateJavaStub​(MetaClass metaclass,
                                              StubInfo mClassStubInfo,
                                              List<MetaClass> accessedClasses,
                                              ClassManager classMgrRef)
        Generates a Java bytecode stub corresponding to the MetaClass provided using the Stub info specified.
        Parameters:
        metaclass - MetaClass from which to generate the stub
        mClassStubInfo - Information the stub must have
        classMgrRef - Reference to class manager
        accessedClasses - Accessed classes of the class
        Returns:
        An array of bytes representing the stub of the MetaClass provided.
      • generateStubAspect

        public static byte[] generateStubAspect​(MetaClass metaclass,
                                                boolean forExec,
                                                ClassManager classMgrRef)
        Generate stub aspect
        Parameters:
        metaclass - Class of the stub
        forExec - Indicates if aspects are for execution environment
        classMgrRef - Reference to class Manager.
        Returns:
        Serialized string representing the aspect