<includes>
<include>javassist/JvstTest.java</include>
</includes>
- <forkMode>once</forkMode>
+ <additionalClasspathElements>
+ <additionalClasspathElement>resources</additionalClasspathElement>
+ </additionalClasspathElements>
+ <forkMode>once</forkMode>
- <workingDirectory>runtest</workingDirectory>
+ <workingDirectory>${project.build.directory}/runtest</workingDirectory>
</configuration>
</plugin>
<plugin>
this.classfile = classfile;
}
- /**
- * Closes this class path.
- */
- @Override
- public void close() {}
-
+ @Override
public String toString() {
return "byte[]:" + classname;
}
return thisClass.getResource(filename);
}
- /**
- * Does nothing.
- */
- @Override
- public void close() {
- }
-
+ @Override
public String toString() {
return thisClass.getName() + ".class";
}
return null;
}
- @Override
- public void close() {}
-
+ @Override
public String toString() {
return directory;
}
return null; // not found
}
- public void close() {
- try {
- jarfile.close();
- jarfile = null;
- }
- catch (IOException e) {}
- }
-
+ @Override
@Override
public String toString() {
- return jarfile == null ? "<null>" : jarfile.toString();
+ return jarfileURL == null ? "<null>" : jarfileURL.toString();
}
}
*
* @return null if the class file could not be found.
*/
+ @Override
public URL find(String classname) {
String cname = classname.replace('.', '/') + ".class";
- ClassLoader cl = (ClassLoader)clref.get();
+ ClassLoader cl = clref.get();
if (cl == null)
return null; // not found
- else {
- URL url = cl.getResource(cname);
- return url;
- }
+ URL url = cl.getResource(cname);
+ return url;
}
-
- /**
- * Closes this class path.
- */
- @Override
- public void close() {
- clref = null;
- }
}