Remove generics.

This commit is contained in:
James Roseborough
2010-07-30 23:47:52 +00:00
parent 839125fb7f
commit 783e4bc092
2 changed files with 9 additions and 11 deletions

View File

@@ -62,7 +62,7 @@ public class lua2java {
private String encoding = "ISO8859-1"; private String encoding = "ISO8859-1";
private boolean recurse = false; private boolean recurse = false;
private boolean verbose = false; private boolean verbose = false;
private List<InputFile> files = new ArrayList<InputFile>(); private List files = new ArrayList();
public static void main( String[] args ) throws IOException { public static void main( String[] args ) throws IOException {
new lua2java( args ); new lua2java( args );
@@ -72,7 +72,7 @@ public class lua2java {
// process args // process args
try { try {
List<String> seeds = new ArrayList<String> (); List seeds = new ArrayList ();
// get stateful args // get stateful args
for ( int i=0; i<args.length; i++ ) { for ( int i=0; i<args.length; i++ ) {
@@ -141,8 +141,8 @@ public class lua2java {
// process input files // process input files
JsePlatform.standardGlobals(); JsePlatform.standardGlobals();
for ( InputFile inf : files ) for ( int i=0,n=files.size(); i<n; i++ )
processFile( inf ); processFile( (InputFile) files.get(i) );
} catch ( Exception ioe ) { } catch ( Exception ioe ) {
System.err.println( ioe.toString() ); System.err.println( ioe.toString() );

View File

@@ -20,7 +20,6 @@
* THE SOFTWARE. * THE SOFTWARE.
******************************************************************************/ ******************************************************************************/
import java.io.DataInputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@@ -31,7 +30,6 @@ import java.util.Hashtable;
import java.util.List; import java.util.List;
import org.luaj.vm2.Lua; import org.luaj.vm2.Lua;
import org.luaj.vm2.compiler.DumpState;
import org.luaj.vm2.lib.jse.JsePlatform; import org.luaj.vm2.lib.jse.JsePlatform;
import org.luaj.vm2.luajc.LuaJC; import org.luaj.vm2.luajc.LuaJC;
@@ -63,7 +61,7 @@ public class luajc {
private boolean verbose = false; private boolean verbose = false;
private boolean loadclasses = false; private boolean loadclasses = false;
private String pkgprefix = null; private String pkgprefix = null;
private List<InputFile> files = new ArrayList<InputFile>(); private List files = new ArrayList();
public static void main( String[] args ) throws IOException { public static void main( String[] args ) throws IOException {
new luajc( args ); new luajc( args );
@@ -72,7 +70,7 @@ public class luajc {
private luajc( String[] args ) throws IOException { private luajc( String[] args ) throws IOException {
// process args // process args
List<String> seeds = new ArrayList<String> (); List seeds = new ArrayList ();
// get stateful args // get stateful args
for ( int i=0; i<args.length; i++ ) { for ( int i=0; i<args.length; i++ ) {
@@ -138,8 +136,8 @@ public class luajc {
// process input files // process input files
JsePlatform.standardGlobals(); JsePlatform.standardGlobals();
for ( InputFile inf : files ) for ( int i=0,n=files.size(); i<n; i++ )
processFile( inf ); processFile( (InputFile) files.get(i) );
} }
private void collectFiles(String path) { private void collectFiles(String path) {
@@ -230,7 +228,7 @@ public class luajc {
try { try {
Class c = loader.loadClass(classname); Class c = loader.loadClass(classname);
if ( verbose ) if ( verbose )
System.out.println(" loaded "+classname+" as "+c ); System.out.println(" loaded "+classname+" as "+c.newInstance() );
} catch ( Throwable th ) { } catch ( Throwable th ) {
System.out.flush(); System.out.flush();
System.err.println(" failed to load "+classname+": "+th ); System.err.println(" failed to load "+classname+": "+th );