Mercurial Hosting > luan
comparison core/src/luan/modules/JavaLuan.java @ 221:ec016471c6eb
make LuanTable an interface
git-svn-id: https://luan-java.googlecode.com/svn/trunk@222 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 17 Jul 2014 07:49:26 +0000 |
parents | 239c8d650028 |
children | 2a54cb7d1cf4 |
comparison
equal
deleted
inserted
replaced
220:61afe2a1ce96 | 221:ec016471c6eb |
---|---|
27 | 27 |
28 public final class JavaLuan { | 28 public final class JavaLuan { |
29 | 29 |
30 public static final LuanFunction LOADER = new LuanFunction() { | 30 public static final LuanFunction LOADER = new LuanFunction() { |
31 @Override public Object call(LuanState luan,Object[] args) { | 31 @Override public Object call(LuanState luan,Object[] args) { |
32 LuanTable module = new LuanTable(); | 32 LuanTable module = Luan.newTable(); |
33 try { | 33 try { |
34 module.put( "class", new LuanJavaFunction(JavaLuan.class.getMethod("getClass",LuanState.class,String.class),null) ); | 34 module.put( "class", new LuanJavaFunction(JavaLuan.class.getMethod("getClass",LuanState.class,String.class),null) ); |
35 add( module, "proxy", LuanState.class, Static.class, LuanTable.class, Object.class ); | 35 add( module, "proxy", LuanState.class, Static.class, LuanTable.class, Object.class ); |
36 } catch(NoSuchMethodException e) { | 36 } catch(NoSuchMethodException e) { |
37 throw new RuntimeException(e); | 37 throw new RuntimeException(e); |