is there any way to calculate halstead Metrics by JavaParser

47 views
Skip to first unread message

Yosef Al Homsy

unread,
Feb 15, 2014, 6:50:20 AM2/15/14
to javap...@googlegroups.com
I 'm trying to build software calculate Halstead metrics in java but i can't find the number of java reserved word by javaparser so please any help will be appreciated 

Ahti Legonkov

unread,
Feb 15, 2014, 3:53:33 PM2/15/14
to javap...@googlegroups.com
Javaparser doesn't directly give you info about reserved words. You need to get that indirectly. For example when you visit ForStmt, you can increment the number of 'for' found, when you visit WhileStmt, you can increment the number of 'while' found, etc.


On 15 February 2014 13:50, Yosef Al Homsy <yosef...@gmail.com> wrote:
I 'm trying to build software calculate Halstead metrics in java but i can't find the number of java reserved word by javaparser so please any help will be appreciated 

--
You received this message because you are subscribed to the Google Groups "JavaParser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javaparser+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
lego

Yosef Al Homsy

unread,
Feb 16, 2014, 11:37:30 AM2/16/14
to javap...@googlegroups.com
thanks for you reply;

But what if i have like this command 

String s= "4";
int x=Integer.getInteger(s);

how i can cunt "Integer.getInteger" as reserved word, Should I have table of all java command to compare my input with it if only by this way can solve my issue please can you guide me from where i can get this java command table 

Best regards 
Reply all
Reply to author
Forward
0 new messages