From 614066f7cada779b1fdfb61f365cebad2cefbf96 Mon Sep 17 00:00:00 2001 From: David Dixon-Peugh Date: Fri, 28 Jun 2002 16:32:01 +0000 Subject: [PATCH] Access Flags set on FieldDeclaration. git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@116 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/etc/Java1.4-c.jjt | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/pmd/etc/Java1.4-c.jjt b/pmd/etc/Java1.4-c.jjt index b7842e7f25..1886a3b263 100644 --- a/pmd/etc/Java1.4-c.jjt +++ b/pmd/etc/Java1.4-c.jjt @@ -476,13 +476,16 @@ void InterfaceMemberDeclaration() : void FieldDeclaration() : { -StringBuffer modifiers = new StringBuffer(); } { - ( "public" {modifiers.append("public,");} | "protected" {modifiers.append("protected,");} | "private" {modifiers.append("private,");} | "static" {modifiers.append("static,");} | "final" {modifiers.append("final,");} | "transient" {modifiers.append("transient,");} | "volatile" {modifiers.append("volatile,");})* - { - jjtThis.setImage(modifiers.toString()); - } + ( "public" { ((AccessNode) jjtThis).setPublic( true ); } + | "protected" { ((AccessNode) jjtThis).setProtected( true ); } + | "private" { ((AccessNode) jjtThis).setPrivate( true ); } + | "static" { ((AccessNode) jjtThis).setStatic( true ); } + | "final" { ((AccessNode) jjtThis).setFinal( true ); } + | "transient" { ((AccessNode) jjtThis).setTransient( true ); } + | "volatile" { ((AccessNode) jjtThis).setVolatile( true ); } )* + Type() VariableDeclarator() ( "," VariableDeclarator() )* ";" } @@ -525,7 +528,16 @@ void ArrayInitializer() : void MethodDeclaration() : {} { - ( "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized" | "strictfp")* + ( "public" { ((AccessNode) jjtThis).setPublic( true ); } + | "protected" { ((AccessNode) jjtThis).setProtected( true ); } + | "private" { ((AccessNode) jjtThis).setPrivate( true ); } + | "static" { ((AccessNode) jjtThis).setStatic( true ); } + | "abstract" { ((AccessNode) jjtThis).setAbstract( true ); } + | "final" { ((AccessNode) jjtThis).setFinal( true ); } + | "native" { ((AccessNode) jjtThis).setNative( true ); } + | "synchronized" { ((AccessNode) jjtThis).setSynchronized( true ); } + | "strictfp" { ((AccessNode) jjtThis).setStrict( true ); } + )* ResultType() MethodDeclarator() [ "throws" NameList() ] ( Block() | ";" ) }