Add package.html, code reformatting

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@368495 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl 2006-01-12 22:17:38 +00:00
parent 62c7704dff
commit cc4590c47e
2 changed files with 29 additions and 12 deletions

View File

@ -16,7 +16,7 @@ package org.apache.maven.natives.util;
* limitations under the License.
* ====================================================================
*/
import java.io.IOException;
import org.apache.bcel.classfile.ClassParser;
@ -26,24 +26,30 @@ import org.apache.bcel.classfile.JavaClass;
* @author Kasper Nielsen
*
*/
public class JavaSourceTool {
public class JavaSourceTool
{
/**
* Parses the java class file and returns an isntance of a Bcel Class
* Parses the java class file and returns an instance of a Bcel Class
*
* @param absoluteFileName the absolute file name to transform
* @return the Bcel Class.
* @throws IOException upon failure to read the java file
*/
public static final JavaClass getBcelClass(String absoluteFileName) throws IOException {
try {
ClassParser parser = new ClassParser(absoluteFileName);
JavaClass clazz= parser.parse();
public static final JavaClass getBcelClass( String absoluteFileName )
throws IOException
{
try
{
ClassParser parser = new ClassParser( absoluteFileName );
JavaClass clazz = parser.parse( );
return clazz;
} catch (Exception e) {
System.out.println("\nError parsing " + absoluteFileName + ": " + e + "\n");
}
catch ( Exception e )
{
System.out.println( "\nError parsing " + absoluteFileName + ": "
+ e + "\n" );
return null;
}
}

View File

@ -0,0 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>org.apache.maven.natives.util</title>
</head>
<body>
<p>
Contains utility classes org.apache.maven.natives.util.
</p>
</body>
</html>