3
Contributors
10
Replies
29
Views
1 Year
Discussion Span
Last Post by JamesCherrill
Featured Replies
  • It's a simple constructor. If you don't know how to use it then, to be honest, you are not yet ready to start using tools like this. Read More

0

Mar Na, you have 6 posts now that dance around but never really come out and tell what you are trying to accomplish.

In a few I see ready to use tools that have source so I would be left guessing what your big picture is here.

Do yourself a solid and reveal your big picture.

0
package javaapplication12;
public class  CyclomaticComplexity {
public static void main(String[]argv) throws ClassFormatException, IOException {

ClassParser parser=new ClassParser(CyclomaticComplexity.class.getResourceAsStream("/javaapplication12/CyclomaticComplexity.class"),"CyclomaticComplexity.class");
    JavaClass javaClass=parser.parse();
    }}}
0

Mr. rproffitt ,in this my code,java parser ,parsing only existing class in existing package,i want to modifiy class path and writing other class path from other package but isn't work!?

Edited by Mar. Na.

0

Look at the constructors for ClassParser. You are using the one that takes an input stream, which you get from you current class loader. It would be a lot easier to use the constructor that takes a file name, or if your class is in a jar, the one that takes a zip file and a file name.

Edited by JamesCherrill

0

How can i use it ? is there any example or website that clarify this?

1

It's a simple constructor. If you don't know how to use it then, to be honest, you are not yet ready to start using tools like this.

0

Ok , I know how to use it but , when I write path I get error ...

Edited by Mar. Na.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.