Gonna need that name before we try to load it
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6122 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -29,6 +29,7 @@ import java.lang.reflect.Type;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
@@ -79,10 +80,14 @@ public class GenDObjectTask extends GenTask
|
|||||||
protected void processObject (File source)
|
protected void processObject (File source)
|
||||||
{
|
{
|
||||||
// load up the file and determine it's package and classname
|
// load up the file and determine it's package and classname
|
||||||
String name = null;
|
String name;
|
||||||
|
try{
|
||||||
|
name = GenUtil.readClassName(source);
|
||||||
|
} catch (IOException io) {
|
||||||
|
throw new BuildException("Couldn't read class name: " + source, io);
|
||||||
|
}
|
||||||
Class<?> klass = loadClass(name);
|
Class<?> klass = loadClass(name);
|
||||||
try {
|
try {
|
||||||
name = GenUtil.readClassName(source);
|
|
||||||
processObject(source, klass);
|
processObject(source, klass);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException("Failed to process " + source.getName(), e);
|
throw new BuildException("Failed to process " + source.getName(), e);
|
||||||
|
|||||||
Reference in New Issue
Block a user