JarAnalyzer Source Code Files

Apache Ant Source Code Files are inside the JarAnalyzer source package like JarAnalyzer-src-1.2.zip. Unzip the source package and go to the "src" sub-directory, you will see source code files.

Here is the list of Java source code files of the JarAnalyzer 1.2 in \Users\fyicenter\JarAnalyzer\src:

✍: FYIcenter.com

com/kirkk/analyzer/framework/bcel/BCELPublicClass.java

package com.kirkk.analyzer.framework.bcel;

import com.kirkk.analyzer.framework.JarClass;
import java.util.*;
import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.classfile.Method;
import org.apache.bcel.classfile.ConstantPool;
import org.apache.bcel.classfile.ConstantUtf8;
import org.apache.bcel.classfile.DescendingVisitor;

public class BCELPublicClass implements JarClass {

    //private JavaClass javaClass;
    private static List ignorePackages;
    private List importedPackages;
    private List publicMethods;
    private String packageName;
    private String longName;
    private boolean isAbstract;
    private boolean isPublic;
    private boolean isInterface;

	public BCELPublicClass(String fileName, String className) throws Exception {
		this(fileName, className, new ArrayList());
	}

	public BCELPublicClass(String fileName, String className, List ignorePackages) throws Exception {
		this(BCELClassFactory.getClass(fileName, className), ignorePackages);
	}


    private BCELPublicClass(JavaClass javaClass, List ignorePackages) {
		this.importedPackages = this.getImportedPackages(javaClass, ignorePackages);
		//this.publicMethods = this.getPublicMethods(javaClass);
		this.packageName = javaClass.getPackageName();
		this.isAbstract = javaClass.isAbstract();
		this.isPublic = javaClass.isPublic();
		this.longName = javaClass.getClassName();
		this.isInterface = javaClass.isInterface();
        //this.javaClass = javaClass;
    }

	private List getImportedPackages(JavaClass javaClass, List ignorePackages) {
		PackageVisitor pVisitor = new PackageVisitor(javaClass);
		DescendingVisitor dVisitor = new DescendingVisitor(javaClass, pVisitor);
		javaClass.accept(dVisitor);
		return pVisitor.getImports(ignorePackages);

		//return pVisitor.getNonJavaImports();
	}

	/*private List getPublicMethods(JavaClass javaClass) {
		ArrayList arraylist = new ArrayList();
		Method methods[] = javaClass.getMethods();
		for(int i = 0; i < methods.length; i++) {
		    if (methods[i].isPublic()) {
		        arraylist.add(new BCELPublicMethod(methods[i]));
			}
		}
        return arraylist;
	}*/

	public boolean isPublic() {
		return this.isPublic;
	}

	public boolean isAbstract() {
		return this.isAbstract;
	}

	public List getImportedPackageNames() {
		return this.importedPackages;
	}

    public String getPackageName() {
        return this.packageName;
    }

    public String getLongName() {
        return this.longName;
    }

   /*public List getPublicMethods() {
		return this.publicMethods;
    }*/

    public boolean isInterface() {
		return this.isInterface;
	}

}

com/kirkk/analyzer/framework/bcel/BCELPublicClass.java

 

Or download all of them as a single archive file:

File name: JarAnalyzer-1.20-fyi.zip
File size: 19949 bytes
Release date: 2007-08-03
Download 

 

jarscan - JAR File Scanner

Download JarAnalyzer Source Package

JarAnalyzer by Kirk Knoernschild

⇑⇑ Java/JAR Tools

2021-07-01, 5582👍, 0💬