|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavancss.parser.debug.JavaParserDebug
public class JavaParserDebug
Java source code parser based on a grammar compiled by JavaCC from Java1.1.jj to the JavaParserDebug class.
This class is responsible for parsing Java code and counting all metrics during this parsing process. The rest of the application is only responsible for invoking this parser in a convenient way and to present the results to the user.
This grammar is based on the Java grammar that comes as an example with JavaCC, but has been extended to collect the metrics data (and adapted to support real life and jdk 1.4 Java sources as well).
Nested Class Summary | |
---|---|
static class |
JavaParserDebug.ModifierSet
Class to hold modifiers. |
Field Summary | |
---|---|
Token |
jj_nt
Next token. |
Token |
token
Current token. |
JavaParserDebugTokenManager |
token_source
Generated Token Manager. |
Constructor Summary | |
---|---|
JavaParserDebug(InputStream stream)
Constructor with InputStream. |
|
JavaParserDebug(InputStream stream,
String encoding)
Constructor with InputStream and supplied encoding |
|
JavaParserDebug(JavaParserDebugTokenManager tm)
Constructor with generated Token Manager. |
|
JavaParserDebug(Reader stream)
Constructor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public JavaParserDebugTokenManager token_source
public Token token
public Token jj_nt
Constructor Detail |
---|
public JavaParserDebug(InputStream stream)
public JavaParserDebug(InputStream stream, String encoding)
public JavaParserDebug(Reader stream)
public JavaParserDebug(JavaParserDebugTokenManager tm)
Method Detail |
---|
public void parse() throws Exception
parse
in interface JavaParserInterface
Exception
public void parseImportUnit() throws Exception
parseImportUnit
in interface JavaParserInterface
Exception
public int getNcss()
getNcss
in interface JavaParserInterface
public int getLOC()
getLOC
in interface JavaParserInterface
public int getJvdc()
getJvdc
in interface JavaParserInterface
public List getFunction()
getFunction
in interface JavaParserInterface
public List getObject()
getObject
in interface JavaParserInterface
public Map getPackage()
getPackage
in interface JavaParserInterface
public List getImports()
getImports
in interface JavaParserInterface
public Object[] getPackageObjects()
getPackageObjects
in interface JavaParserInterface
public String getLastFunction()
getLastFunction
in interface JavaParserInterface
public final void CompilationUnit() throws ParseException
ParseException
public final void ImportUnit() throws ParseException
ParseException
public final void PackageDeclaration() throws ParseException
ParseException
public final void ImportDeclaration() throws ParseException
ParseException
public final void TypeDeclaration() throws ParseException
ParseException
public final void ClassDeclaration() throws ParseException
ParseException
public final void UnmodifiedClassDeclaration() throws ParseException
ParseException
public final void ClassBody() throws ParseException
ParseException
public final void NestedClassDeclaration() throws ParseException
ParseException
public final void ClassBodyDeclaration() throws ParseException
ParseException
public final void MethodDeclarationLookahead() throws ParseException
ParseException
public final void InterfaceDeclaration() throws ParseException
ParseException
public final void NestedInterfaceDeclaration() throws ParseException
ParseException
public final void UnmodifiedInterfaceDeclaration() throws ParseException
ParseException
public final void InterfaceMemberDeclaration() throws ParseException
ParseException
public final void FieldDeclaration() throws ParseException
ParseException
public final void VariableDeclarator() throws ParseException
ParseException
public final void VariableDeclaratorId() throws ParseException
ParseException
public final void VariableInitializer() throws ParseException
ParseException
public final void ArrayInitializer() throws ParseException
ParseException
public final void MethodDeclaration() throws ParseException
ParseException
public final void MethodDeclarator() throws ParseException
ParseException
public final void FormalParameters() throws ParseException
ParseException
public final void FormalParameter() throws ParseException
ParseException
public final void ConstructorDeclaration() throws ParseException
ParseException
public final void ExplicitConstructorInvocation() throws ParseException
ParseException
public final void Initializer() throws ParseException
ParseException
public final void Type() throws ParseException
ParseException
public final void FieldTypeLookahead() throws ParseException
ParseException
public final void PrimitiveType() throws ParseException
ParseException
public final void ResultType() throws ParseException
ParseException
public final void Name() throws ParseException
ParseException
public final void FieldTypeNameLookahead() throws ParseException
ParseException
public final void NameList() throws ParseException
ParseException
public final void Expression() throws ParseException
ParseException
public final void Assignment() throws ParseException
ParseException
public final void AssignmentOperator() throws ParseException
ParseException
public final void ConditionalExpression() throws ParseException
ParseException
public final void ConditionalOrExpression() throws ParseException
ParseException
public final void ConditionalAndExpression() throws ParseException
ParseException
public final void InclusiveOrExpression() throws ParseException
ParseException
public final void ExclusiveOrExpression() throws ParseException
ParseException
public final void AndExpression() throws ParseException
ParseException
public final void EqualityExpression() throws ParseException
ParseException
public final void InstanceOfExpression() throws ParseException
ParseException
public final void RelationalExpression() throws ParseException
ParseException
public final void ShiftExpression() throws ParseException
ParseException
public final void AdditiveExpression() throws ParseException
ParseException
public final void MultiplicativeExpression() throws ParseException
ParseException
public final void UnaryExpression() throws ParseException
ParseException
public final void PreIncrementExpression() throws ParseException
ParseException
public final void PreDecrementExpression() throws ParseException
ParseException
public final void UnaryExpressionNotPlusMinus() throws ParseException
ParseException
public final void CastLookahead() throws ParseException
ParseException
public final void PostfixLookahead() throws ParseException
ParseException
public final void PostfixExpression() throws ParseException
ParseException
public final void CastExpression() throws ParseException
ParseException
public final void PrimaryExpression() throws ParseException
ParseException
public final void PrimaryPrefix() throws ParseException
ParseException
public final void PrimarySuffix() throws ParseException
ParseException
public final void Literal() throws ParseException
ParseException
public final void BooleanLiteral() throws ParseException
ParseException
public final void NullLiteral() throws ParseException
ParseException
public final void Arguments() throws ParseException
ParseException
public final void ArgumentList() throws ParseException
ParseException
public final void AllocationExpression() throws ParseException
ParseException
public final void ArrayDimsAndInits() throws ParseException
ParseException
public final void Statement() throws ParseException
ParseException
public final void LabeledStatement() throws ParseException
ParseException
public final void AssertStatementLookahead() throws ParseException
ParseException
public final void AssertStatement() throws ParseException
ParseException
public final void Block() throws ParseException
ParseException
public final void BlockStatement() throws ParseException
ParseException
public final void LocalVariableDeclaration() throws ParseException
ParseException
public final void EmptyStatement() throws ParseException
ParseException
public final void StatementExpression() throws ParseException
ParseException
public final void SwitchStatement() throws ParseException
ParseException
public final void SwitchLabel() throws ParseException
ParseException
public final void IfStatement() throws ParseException
ParseException
public final void WhileStatement() throws ParseException
ParseException
public final void DoStatement() throws ParseException
ParseException
public final void ForStatement() throws ParseException
ParseException
public final void ForInit() throws ParseException
ParseException
public final void StatementExpressionList() throws ParseException
ParseException
public final void ForUpdate() throws ParseException
ParseException
public final void BreakStatement() throws ParseException
ParseException
public final void ContinueStatement() throws ParseException
ParseException
public final void ReturnStatement() throws ParseException
ParseException
public final void ThrowStatement() throws ParseException
ParseException
public final void SynchronizedStatement() throws ParseException
ParseException
public final void TryStatement() throws ParseException
ParseException
public final void Identifier() throws ParseException
ParseException
public final void Annotation() throws ParseException
ParseException
public final void NormalAnnotation() throws ParseException
ParseException
public final void MarkerAnnotation() throws ParseException
ParseException
public final void SingleMemberAnnotation() throws ParseException
ParseException
public final void MemberValuePairs() throws ParseException
ParseException
public final void MemberValuePair() throws ParseException
ParseException
public final void MemberValue() throws ParseException
ParseException
public final void MemberValueArrayInitializer() throws ParseException
ParseException
public final void CreationAnnotation() throws ParseException
ParseException
public final void AnnotationTypeDeclaration(int modifiers) throws ParseException
ParseException
public final void AnnotationTypeBody() throws ParseException
ParseException
public final void AnnotationTypeMemberDeclaration() throws ParseException
ParseException
public final void DefaultValue() throws ParseException
ParseException
public final int Modifiers() throws ParseException
ParseException
public final void ClassOrInterfaceDeclaration(int modifiers) throws ParseException
ParseException
public final void EnumDeclaration(int modifiers) throws ParseException
ParseException
public final void TypeParameters() throws ParseException
ParseException
public final void ExtendsList(boolean isInterface) throws ParseException
ParseException
public final void ImplementsList(boolean isInterface) throws ParseException
ParseException
public final void ClassOrInterfaceBody(boolean isInterface) throws ParseException
ParseException
public final void EnumBody() throws ParseException
ParseException
public final void TypeParameter() throws ParseException
ParseException
public final void ClassOrInterfaceType() throws ParseException
ParseException
public final void ClassOrInterfaceBodyDeclaration(boolean isInterface) throws ParseException
ParseException
public final void EnumConstant() throws ParseException
ParseException
public final void TypeBound() throws ParseException
ParseException
public final void TypeArguments() throws ParseException
ParseException
public final void TypeArgument() throws ParseException
ParseException
public final void ReferenceType() throws ParseException
ParseException
public final void WildcardBounds() throws ParseException
ParseException
public final void FieldDeclaration15(int modifiers) throws ParseException
ParseException
public final void MethodDeclaration15(int modifiers) throws ParseException
ParseException
public final void MethodDeclarator15() throws ParseException
ParseException
public final void FormalParameters15() throws ParseException
ParseException
public final void FormalParameter15() throws ParseException
ParseException
public final void MemberSelector() throws ParseException
ParseException
public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(Reader stream)
public void ReInit(JavaParserDebugTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |