Mercurial Hosting > luan
comparison core/src/luan/modules/StringLuan.java @ 264:9e0d4452e649
implement URL style module names
git-svn-id: https://luan-java.googlecode.com/svn/trunk@265 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Wed, 29 Oct 2014 03:50:59 +0000 |
parents | 705d14f4d8ee |
children | 82a3ebcfbafa |
comparison
equal
deleted
inserted
replaced
263:54873a389f80 | 264:9e0d4452e649 |
---|---|
41 private static void add(LuanTable t,String method,Class<?>... parameterTypes) throws NoSuchMethodException { | 41 private static void add(LuanTable t,String method,Class<?>... parameterTypes) throws NoSuchMethodException { |
42 t.put( method, new LuanJavaFunction(StringLuan.class.getMethod(method,parameterTypes),null) ); | 42 t.put( method, new LuanJavaFunction(StringLuan.class.getMethod(method,parameterTypes),null) ); |
43 } | 43 } |
44 | 44 |
45 public static Object __index(LuanState luan,final String s,Object key) throws LuanException { | 45 public static Object __index(LuanState luan,final String s,Object key) throws LuanException { |
46 LuanTable mod = (LuanTable)PackageLuan.loaded(luan).get("String"); | 46 LuanTable mod = (LuanTable)PackageLuan.loaded(luan).get("luan:String"); |
47 if( mod!=null ) { | 47 if( mod!=null ) { |
48 Object obj = mod.get(key); | 48 Object obj = mod.get(key); |
49 if( obj instanceof LuanFunction ) { | 49 if( obj instanceof LuanFunction ) { |
50 final LuanFunction fn = (LuanFunction)obj; | 50 final LuanFunction fn = (LuanFunction)obj; |
51 return new LuanFunction() { | 51 return new LuanFunction() { |