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

98
LINES

< > BotCompany Repo | #1016415 // JavaX Hello World using standard functions from x30 (outdated method, use x30_util instead)

JavaX source code [tags: archive use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (305L/3K/8K).

!7

static void print_append(StringBuffer buf, String s, int max) {
  x30.print_append(buf, s, max);
}

// vararg fixer
static Object callMC(S method, S[] arg) {
  ret callMC(method, new O[] {arg});
}

static O callMC(S method, O... args) {
  ret call(mc(), method, args);
}

static S fixNewLines(S s) {
  ret x30.fixNewLines(s);
}

ifclass F0
  static <A> A callF(F0<A> f) {
    ret f == null ? null : f.get();
  }
endif

ifclass F1
  static <A, B> B callF(F1<A, B> f, A a) {
    ret f == null ? null : f.get(a);
  }
endif

ifclass F2
  static <A, B, C> C callF(F2<A, B, C> f, A a, B b) {
    ret f == null ? null : f.get(a, b);
  }
endif

static O callF(O f, O... args) ctex {
  if (f instanceof S)
    ret callMC((S) f, args);
  ifclass DynamicCallable
    if (f instanceof DynamicCallable)
      ret f/DynamicCallable._dyn(args);
  endif
  ret x30.callF(f, args);
}

static <A> A get(L<A> l, int idx) {
  ret x30.get(l, idx);
}

static <A> A get(A[] l, int idx) {
  ret x30.get(l, idx);
}

static bool get(bool[] l, int idx) {
  ret x30.get(l, idx);
}

static Object get(Object o, String field) {
  ret x30.get(o, field);
}

static Object get_raw(Object o, String field) {
  ret x30.get_raw(o, field);
}

static Object get(Class c, String field) {
  ret x30.get(c, field);
}

static Field get_findStaticField(Class<?> c, String field) {
  ret x30.get_findStaticField(c, field);
}

static Field get_findField(Class<?> c, String field) {
  ret x30.get_findField(c, field);
}

static O call(O o) {
  ret callF(o);
}

static O call(O o, S method, O... args) {
  ret x30.call(o, method, args);
}

static bool call_checkArgs(Method m, O[] args, bool debug) {
  ret x30.call_checkArgs(m, args, debug);
}

static <A, B> Map<A, B> newWeakHashMap() {
  ret x30.newWeakHashMap();
}

p {
  print("Hello world!");
}

Author comment

Began life as a copy of #1001167

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): cfunsshuasjs, mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1016415
Snippet name: JavaX Hello World using standard functions from x30 (outdated method, use x30_util instead)
Eternal ID of this version: #1016415/15
Text MD5: 90ec3e2c40454fd22e6758bc56b0b35e
Transpilation MD5: 07baabf6dc4ecaaa7ef47e9336f2d978
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): Yes
Created/modified: 2018-06-24 16:14:51
Source code size: 1903 bytes / 98 lines
Pitched / IR pitched: No / No
Views / Downloads: 363 / 686
Version history: 14 change(s)
Referenced in: [show references]