Fix links in javadoc
This commit is contained in:
@@ -33,7 +33,7 @@ import org.luaj.vm2.LuaValue;
|
||||
/**
|
||||
* Helper class to coerce values from Java to lua within the luajava library.
|
||||
* <p>
|
||||
* This class is primarily used by the {@link LuajavaLib},
|
||||
* This class is primarily used by the {@link org.luaj.vm2.lib.jse.LuajavaLib},
|
||||
* but can also be used directly when working with Java/lua bindings.
|
||||
* <p>
|
||||
* To coerce scalar types, the various, generally the {@code valueOf(type)} methods
|
||||
@@ -59,7 +59,7 @@ import org.luaj.vm2.LuaValue;
|
||||
* table, or table of tables.
|
||||
*
|
||||
* @see CoerceJavaToLua#coerce(Object)
|
||||
* @see LuajavaLib
|
||||
* @see org.luaj.vm2.lib.jse.LuajavaLib
|
||||
*/
|
||||
public class CoerceJavaToLua {
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.luaj.vm2.LuaValue;
|
||||
/**
|
||||
* Helper class to coerce values from lua to Java within the luajava library.
|
||||
* <p>
|
||||
* This class is primarily used by the {@link LuajavaLib},
|
||||
* This class is primarily used by the {@link org.luaj.vm2.lib.jse.LuajavaLib},
|
||||
* but can also be used directly when working with Java/lua bindings.
|
||||
* <p>
|
||||
* To coerce to specific Java values, generally the {@code toType()} methods
|
||||
@@ -54,7 +54,7 @@ import org.luaj.vm2.LuaValue;
|
||||
* For data in lua tables, the various methods on {@link LuaTable} can be used directly
|
||||
* to convert data to something more useful.
|
||||
*
|
||||
* @see LuajavaLib
|
||||
* @see org.luaj.vm2.lib.jse.LuajavaLib
|
||||
* @see CoerceJavaToLua
|
||||
*/
|
||||
public class CoerceLuaToJava {
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.luaj.vm2.Globals;
|
||||
import org.luaj.vm2.LuaValue;
|
||||
import org.luaj.vm2.lib.BaseLib;
|
||||
import org.luaj.vm2.lib.LibFunction;
|
||||
@@ -33,16 +34,16 @@ import org.luaj.vm2.lib.ResourceFinder;
|
||||
|
||||
/**
|
||||
* Subclass of {@link BaseLib} and {@link LibFunction} which implements the lua basic library functions
|
||||
* and provides a directory based {@link ResourceFinder} as the {@link #finder}.
|
||||
* and provides a directory based {@link ResourceFinder} as the {@link Globals#finder}.
|
||||
* <p>
|
||||
* Since JME has no file system by default, {@link BaseLib} implements
|
||||
* {@link ResourceFinder} using {@link Class#getResource(String)}.
|
||||
* The {@link JseBaseLib} implements {@link finder} by scanning the current directory
|
||||
* The {@link org.luaj.vm2.lib.jse.JseBaseLib} implements {@link Globals#finder} by scanning the current directory
|
||||
* first, then falling back to {@link Class#getResource(String)} if that fails.
|
||||
* Otherwise, the behavior is the same as that of {@link BaseLib}.
|
||||
* <p>
|
||||
* Typically, this library is included as part of a call to
|
||||
* {@link JsePlatform#standardGlobals()}
|
||||
* {@link org.luaj.vm2.lib.jse.JsePlatform#standardGlobals()}
|
||||
* <pre> {@code
|
||||
* Globals globals = JsePlatform.standardGlobals();
|
||||
* globals.get("print").call(LuaValue.valueOf("hello, world"));
|
||||
@@ -62,9 +63,9 @@ import org.luaj.vm2.lib.ResourceFinder;
|
||||
* @see Globals
|
||||
* @see BaseLib
|
||||
* @see ResourceFinder
|
||||
* @see {@link Globals.finder}
|
||||
* @see Globals#finder
|
||||
* @see LibFunction
|
||||
* @see JsePlatform
|
||||
* @see org.luaj.vm2.lib.jse.JsePlatform
|
||||
* @see org.luaj.vm2.lib.jme.JmePlatform
|
||||
* @see <a href="http://www.lua.org/manual/5.2/manual.html#6.1">Lua 5.2 Base Lib Reference</a>
|
||||
*/
|
||||
@@ -75,7 +76,7 @@ public class JseBaseLib extends org.luaj.vm2.lib.BaseLib {
|
||||
/** Perform one-time initialization on the library by creating a table
|
||||
* containing the library functions, adding that table to the supplied environment,
|
||||
* adding the table to package.loaded, and returning table as the return value.
|
||||
* <P>Specifically, extend the library loading to set the default value for {@link Globals.STDIN}
|
||||
* <P>Specifically, extend the library loading to set the default value for {@link Globals#STDIN}
|
||||
* @param modname the module name supplied if this is loaded via 'require'.
|
||||
* @param env the environment to load into, which must be a Globals instance.
|
||||
*/
|
||||
|
||||
@@ -29,6 +29,7 @@ import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.io.RandomAccessFile;
|
||||
|
||||
import org.luaj.vm2.Globals;
|
||||
import org.luaj.vm2.LuaError;
|
||||
import org.luaj.vm2.LuaString;
|
||||
import org.luaj.vm2.LuaValue;
|
||||
@@ -42,7 +43,7 @@ import org.luaj.vm2.lib.LibFunction;
|
||||
* It uses RandomAccessFile to implement seek on files.
|
||||
* <p>
|
||||
* Typically, this library is included as part of a call to
|
||||
* {@link JsePlatform#standardGlobals()}
|
||||
* {@link org.luaj.vm2.lib.jse.JsePlatform#standardGlobals()}
|
||||
* <pre> {@code
|
||||
* Globals globals = JsePlatform.standardGlobals();
|
||||
* globals.get("io").get("write").call(LuaValue.valueOf("hello, world\n"));
|
||||
@@ -62,10 +63,10 @@ import org.luaj.vm2.lib.LibFunction;
|
||||
* <p>
|
||||
* This has been implemented to match as closely as possible the behavior in the corresponding library in C.
|
||||
* @see LibFunction
|
||||
* @see JsePlatform
|
||||
* @see org.luaj.vm2.lib.jse.JsePlatform
|
||||
* @see org.luaj.vm2.lib.jme.JmePlatform
|
||||
* @see IoLib
|
||||
* @see JmeIoLib
|
||||
* @see org.luaj.vm2.lib.jme.JmeIoLib
|
||||
* @see <a href="http://www.lua.org/manual/5.2/manual.html#6.8">Lua 5.2 I/O Lib Reference</a>
|
||||
*/
|
||||
public class JseIoLib extends IoLib {
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
******************************************************************************/
|
||||
package org.luaj.vm2.lib.jse;
|
||||
|
||||
import org.luaj.vm2.Globals;
|
||||
import org.luaj.vm2.LuaValue;
|
||||
import org.luaj.vm2.lib.LibFunction;
|
||||
|
||||
@@ -29,10 +30,10 @@ import org.luaj.vm2.lib.LibFunction;
|
||||
* library.
|
||||
* <p>
|
||||
* It contains all lua math functions, including those not available on the JME platform.
|
||||
* See {@link org.luaj.lib.MathLib} for the exception list.
|
||||
* See {@link org.luaj.vm2.lib.MathLib} for the exception list.
|
||||
* <p>
|
||||
* Typically, this library is included as part of a call to
|
||||
* {@link JsePlatform#standardGlobals()}
|
||||
* {@link org.luaj.vm2.lib.jse.JsePlatform#standardGlobals()}
|
||||
* <pre> {@code
|
||||
* Globals globals = JsePlatform.standardGlobals();
|
||||
* System.out.println( globals.get("math").get("sqrt").call( LuaValue.valueOf(2) ) );
|
||||
@@ -52,9 +53,9 @@ import org.luaj.vm2.lib.LibFunction;
|
||||
* <p>
|
||||
* This has been implemented to match as closely as possible the behavior in the corresponding library in C.
|
||||
* @see LibFunction
|
||||
* @see JsePlatform
|
||||
* @see org.luaj.vm2.lib.jse.JsePlatform
|
||||
* @see org.luaj.vm2.lib.jme.JmePlatform
|
||||
* @see JseMathLib
|
||||
* @see org.luaj.vm2.lib.jse.JseMathLib
|
||||
* @see <a href="http://www.lua.org/manual/5.2/manual.html#6.6">Lua 5.2 Math Lib Reference</a>
|
||||
*/
|
||||
public class JseMathLib extends org.luaj.vm2.lib.MathLib {
|
||||
|
||||
@@ -24,9 +24,11 @@ package org.luaj.vm2.lib.jse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.luaj.vm2.Globals;
|
||||
import org.luaj.vm2.LuaValue;
|
||||
import org.luaj.vm2.Varargs;
|
||||
import org.luaj.vm2.lib.LibFunction;
|
||||
import org.luaj.vm2.lib.OsLib;
|
||||
|
||||
/**
|
||||
* Subclass of {@link LibFunction} which implements the standard lua {@code os} library.
|
||||
@@ -45,7 +47,7 @@ import org.luaj.vm2.lib.LibFunction;
|
||||
* from their counterparts in the C platform.
|
||||
* <p>
|
||||
* Typically, this library is included as part of a call to
|
||||
* {@link JsePlatform#standardGlobals()}
|
||||
* {@link org.luaj.vm2.lib.jse.JsePlatform#standardGlobals()}
|
||||
* <pre> {@code
|
||||
* Globals globals = JsePlatform.standardGlobals();
|
||||
* System.out.println( globals.get("os").get("time").call() );
|
||||
@@ -65,7 +67,7 @@ import org.luaj.vm2.lib.LibFunction;
|
||||
* <p>
|
||||
* @see LibFunction
|
||||
* @see OsLib
|
||||
* @see JsePlatform
|
||||
* @see org.luaj.vm2.lib.jse.JsePlatform
|
||||
* @see org.luaj.vm2.lib.jme.JmePlatform
|
||||
* @see <a href="http://www.lua.org/manual/5.2/manual.html#6.9">Lua 5.2 OS Lib Reference</a>
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.luaj.vm2.lib.ResourceFinder;
|
||||
import org.luaj.vm2.lib.StringLib;
|
||||
import org.luaj.vm2.lib.TableLib;
|
||||
|
||||
/** The {@link JsePlatform} class is a convenience class to standardize
|
||||
/** The {@link org.luaj.vm2.lib.jse.JsePlatform} class is a convenience class to standardize
|
||||
* how globals tables are initialized for the JSE platform.
|
||||
* <p>
|
||||
* It is used to allocate either a set of standard globals using
|
||||
@@ -56,29 +56,30 @@ import org.luaj.vm2.lib.TableLib;
|
||||
* globals.get("require").call(LuaValue.valueOf("main"));
|
||||
* } </pre>
|
||||
* For this to succeed, the file "main.lua" must be in the current directory or a resource.
|
||||
* See {@link JseBaseLib} for details on finding scripts using {@link ResourceFinder}.
|
||||
* See {@link org.luaj.vm2.lib.jse.JseBaseLib} for details on finding scripts using {@link ResourceFinder}.
|
||||
* <p>
|
||||
* The standard globals will contain all standard libraries plus {@code luajava}:
|
||||
* <ul>
|
||||
* <li>{@link Globals}</li>
|
||||
* <li>{@link JseBaseLib}</li>
|
||||
* <li>{@link org.luaj.vm2.lib.jse.JseBaseLib}</li>
|
||||
* <li>{@link PackageLib}</li>
|
||||
* <li>{@link Bit32Lib}</li>
|
||||
* <li>{@link TableLib}</li>
|
||||
* <li>{@link StringLib}</li>
|
||||
* <li>{@link CoroutineLib}</li>
|
||||
* <li>{@link JseMathLib}</li>
|
||||
* <li>{@link JseIoLib}</li>
|
||||
* <li>{@link JseOsLib}</li>
|
||||
* <li>{@link LuajavaLib}</li>
|
||||
* <li>{@link org.luaj.vm2.lib.jse.JseMathLib}</li>
|
||||
* <li>{@link org.luaj.vm2.lib.jse.JseIoLib}</li>
|
||||
* <li>{@link org.luaj.vm2.lib.jse.JseOsLib}</li>
|
||||
* <li>{@link org.luaj.vm2.lib.jse.LuajavaLib}</li>
|
||||
* </ul>
|
||||
* In addition, the {@link LuaC} compiler is installed so lua files may be loaded in their source form.
|
||||
* <p>
|
||||
* The debug globals are simply the standard globals plus the {@code debug} library {@link DebugLib}.
|
||||
* <p>
|
||||
* The class ensures that initialization is done in the correct order,
|
||||
* and that linkage is made to {@link LuaThread#setGlobals(LuaValue)}.
|
||||
* @see JmePlatform
|
||||
* The class ensures that initialization is done in the correct order.
|
||||
*
|
||||
* @see Globals
|
||||
* @see org.luaj.vm2.lib.jme.JmePlatform
|
||||
*/
|
||||
public class JsePlatform {
|
||||
|
||||
@@ -87,8 +88,8 @@ public class JsePlatform {
|
||||
*
|
||||
* @return Table of globals initialized with the standard JSE libraries
|
||||
* @see #debugGlobals()
|
||||
* @see JsePlatform
|
||||
* @see JmePlatform
|
||||
* @see org.luaj.vm2.lib.jse.JsePlatform
|
||||
* @see org.luaj.vm2.lib.jme.JmePlatform
|
||||
*/
|
||||
public static Globals standardGlobals() {
|
||||
Globals globals = new Globals();
|
||||
@@ -107,12 +108,12 @@ public class JsePlatform {
|
||||
return globals;
|
||||
}
|
||||
|
||||
/** Create standard globals including the {@link debug} library.
|
||||
/** Create standard globals including the {@link DebugLib} library.
|
||||
*
|
||||
* @return Table of globals initialized with the standard JSE and debug libraries
|
||||
* @see #standardGlobals()
|
||||
* @see JsePlatform
|
||||
* @see JmePlatform
|
||||
* @see org.luaj.vm2.lib.jse.JsePlatform
|
||||
* @see org.luaj.vm2.lib.jme.JmePlatform
|
||||
* @see DebugLib
|
||||
*/
|
||||
public static Globals debugGlobals() {
|
||||
|
||||
@@ -28,6 +28,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
|
||||
import org.luaj.vm2.Globals;
|
||||
import org.luaj.vm2.LuaError;
|
||||
import org.luaj.vm2.LuaTable;
|
||||
import org.luaj.vm2.LuaValue;
|
||||
@@ -45,7 +46,7 @@ import org.luaj.vm2.lib.VarArgFunction;
|
||||
*
|
||||
* <p>
|
||||
* Typically, this library is included as part of a call to
|
||||
* {@link JsePlatform#standardGlobals()}
|
||||
* {@link org.luaj.vm2.lib.jse.JsePlatform#standardGlobals()}
|
||||
* <pre> {@code
|
||||
* Globals globals = JsePlatform.standardGlobals();
|
||||
* System.out.println( globals.get("luajava").get("bindClass").call( LuaValue.valueOf("java.lang.System") ).invokeMethod("currentTimeMillis") );
|
||||
@@ -65,7 +66,7 @@ import org.luaj.vm2.lib.VarArgFunction;
|
||||
* <p>
|
||||
*
|
||||
* The {@code luajava} library is available
|
||||
* on all JSE platforms via the call to {@link JsePlatform#standardGlobals()}
|
||||
* on all JSE platforms via the call to {@link org.luaj.vm2.lib.jse.JsePlatform#standardGlobals()}
|
||||
* and the luajava api's are simply invoked from lua.
|
||||
* Because it makes extensive use of Java's reflection API, it is not available
|
||||
* on JME, but can be used in Android applications.
|
||||
|
||||
@@ -27,18 +27,18 @@ import java.io.Reader;
|
||||
import java.util.Hashtable;
|
||||
|
||||
import org.luaj.vm2.Globals;
|
||||
import org.luaj.vm2.LoadState;
|
||||
import org.luaj.vm2.LuaClosure;
|
||||
import org.luaj.vm2.LuaFunction;
|
||||
import org.luaj.vm2.LuaValue;
|
||||
import org.luaj.vm2.Prototype;
|
||||
import org.luaj.vm2.compiler.LuaC;
|
||||
import org.luaj.vm2.lib.BaseLib;
|
||||
|
||||
/**
|
||||
* Implementation of {@link LuaCompiler} which does direct
|
||||
* Implementation of {@link org.luaj.vm2.Globals.Compiler} which does direct
|
||||
* lua-to-java-bytecode compiling.
|
||||
* <p>
|
||||
* By default, when using {@link JsePlatform} or {@JmePlatform}
|
||||
* By default, when using {@link org.luaj.vm2.lib.jse.JsePlatform} or
|
||||
* {@link org.luaj.vm2.lib.jme.JmePlatform}
|
||||
* to construct globals, the plain compiler {@link LuaC} is installed and lua code
|
||||
* will only be compiled into lua bytecode and execute as {@link LuaClosure}.
|
||||
* <p>
|
||||
@@ -57,9 +57,9 @@ import org.luaj.vm2.lib.BaseLib;
|
||||
* If the library is not found, the default {@link LuaC} lua-to-lua-bytecode
|
||||
* compiler will be used.
|
||||
*
|
||||
* @see LuaCompiler
|
||||
* @see LuaC
|
||||
* @see BaseLib
|
||||
* @see Globals#compiler
|
||||
* @see #install(Globals)
|
||||
* @see org.luaj.vm2.compiler.LuaC
|
||||
* @see LuaValue
|
||||
*/
|
||||
public class LuaJC implements Globals.Loader {
|
||||
|
||||
Reference in New Issue
Block a user