Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1027593 // Try to get new class as byte[] from ByteBuddy [seems to work]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 3273K of libraries. Click here for Pure Java version (17269L/123K).

!7

lib 1400352 // ByteBuddy

import net.bytebuddy.*;
import net.bytebuddy.dynamic.*;

module TestByteBuddy > DynPrintLog {
  start-thread {
    DynamicType.Unloaded c = new ByteBuddy()
      .subclass(Concept)
      .name("main$DynamicallyMade")
      .make();
    print(_getClass(c));
    print(getOpt binaryRepresentation(c));
  }
}

Author comment

Began life as a copy of #1027589

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027593
Snippet name: Try to get new class as byte[] from ByteBuddy [seems to work]
Eternal ID of this version: #1027593/6
Text MD5: d50732f1514473ecfaa276d65bf83a62
Transpilation MD5: 4f28bddcb6de1deb22e1700945e88691
Author: stefan
Category: javax
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-25 14:09:47
Source code size: 351 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 168 / 282
Version history: 5 change(s)
Referenced in: #1027594 - Add new class from ByteBuddy to module's class loader Spike [WORKS, astonishingly]