[jboss-cvs] JBossAS SVN: r59190 - in projects/aop/branches/arrays/aop/src: main/org/jboss/aop main/org/jboss/aop/array main/org/jboss/aop/instrument main/org/jboss/aop/pointcut/ast resources/test resources/test/array test/org/jboss/test/aop test/org/jboss/test/aop/array

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Dec 21 07:02:09 EST 2006


Author: kabir.khan at jboss.com
Date: 2006-12-21 07:02:00 -0500 (Thu, 21 Dec 2006)
New Revision: 59190

Added:
   projects/aop/branches/arrays/aop/src/main/org/jboss/aop/array/
   projects/aop/branches/arrays/aop/src/main/org/jboss/aop/array/ArrayAdvisor.java
   projects/aop/branches/arrays/aop/src/main/org/jboss/aop/array/ArrayReplacement.java
   projects/aop/branches/arrays/aop/src/main/org/jboss/aop/instrument/ArrayAccessTransformer.java
   projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArrayAccess.java
   projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArrayGet.java
   projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArraySet.java
   projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/pointcut.jj
   projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/typeExpression.jj
   projects/aop/branches/arrays/aop/src/resources/test/array/
   projects/aop/branches/arrays/aop/src/resources/test/array/MANIFEST.MF
   projects/aop/branches/arrays/aop/src/resources/test/array/jboss-aop.xml
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/AOPArrayTestCase.java
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/AOPTransformer.java
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/Agent.java
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ArrayAdvisor.java
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ArrayTestCase.java
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithArrayFieldCaller.java
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithArrayFields.java
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithSimpleFieldCaller.java
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithSimpleFields.java
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/META-INF/
   projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/Main.java
Log:
Add initial tests for array interception

Added: projects/aop/branches/arrays/aop/src/main/org/jboss/aop/array/ArrayAdvisor.java
===================================================================
--- projects/aop/branches/arrays/aop/src/main/org/jboss/aop/array/ArrayAdvisor.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/main/org/jboss/aop/array/ArrayAdvisor.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,156 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.aop.array;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ArrayAdvisor
+{
+   public static Object array;
+   public static String value;
+   public static int index;
+   
+   public static void clear()
+   {
+      array = null;
+      value = null;
+      index = -1;
+   }
+   
+   private static void recordAccess(Object array, int index, String value)
+   {
+      System.out.println("Accessing array");
+      ArrayAdvisor.array = array;
+      ArrayAdvisor.index = index;
+      ArrayAdvisor.value = value;
+   }
+   
+   //Write operations
+   public static void arrayWrite(boolean[] array, int index, boolean value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+
+   public static void arrayWrite(short[] array, int index, short value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+
+   public static void arrayWrite(int[] array, int index, int value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+   
+   public static void arrayWrite(long[] array, int index, long value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+   
+   public static void arrayWrite(float[] array, int index, float value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+   
+   public static void arrayWrite(double[] array, int index, double value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+   
+   public static void arrayWrite(char[] array, int index, char value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+   
+   public static void arrayWrite(Object[] array, int index, Object value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+
+   //Read operations
+   public static boolean arrayRead(boolean[] array, int index)
+   {
+      
+      boolean value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+
+   public static short arrayRead(short[] array, int index)
+   {
+      short value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+
+   public static int arrayRead(int[] array, int index)
+   {
+      int value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   public static long arrayRead(long[] array, int index)
+   {
+      long value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   public static float arrayRead(float[] array, int index)
+   {
+      float value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   public static double arrayRead(double[] array, int index)
+   {
+      double value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   public static char arrayRead(char[] array, int index)
+   {
+      char value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   public static Object arrayRead(Object[] array, int index)
+   {
+      Object value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+}

Added: projects/aop/branches/arrays/aop/src/main/org/jboss/aop/array/ArrayReplacement.java
===================================================================
--- projects/aop/branches/arrays/aop/src/main/org/jboss/aop/array/ArrayReplacement.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/main/org/jboss/aop/array/ArrayReplacement.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,104 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.aop.array;
+
+import javassist.CtClass;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.pointcut.TypeMatcher;
+import org.jboss.aop.pointcut.Util;
+import org.jboss.aop.pointcut.ast.ASTStart;
+import org.jboss.aop.pointcut.ast.ClassExpression;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ArrayReplacement
+{
+   private String name;
+   protected ClassExpression classExpr;
+   protected ASTStart ast;
+
+   public ArrayReplacement(String name, String exp)
+   {
+      this.name = name;
+      this.classExpr = new ClassExpression(exp);
+   }
+
+   public ArrayReplacement(String name, ASTStart ast)
+   {
+      this.name = name;
+      this.ast = ast;
+   }
+
+   public boolean equals(Object obj)
+   {
+      if (obj == this) return true;
+      if (!(obj instanceof ArrayReplacement)) return false;
+      return ((ArrayReplacement) obj).getName().equals(name);
+   }
+
+   public int hashCode()
+   {
+      return name.hashCode();
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public String getClassExpr()
+   {
+      if (classExpr == null) return null;
+      return classExpr.getOriginal();
+   }
+
+   public ASTStart getAst()
+   {
+      return ast;
+   }
+
+   public boolean matches(Advisor advisor, CtClass clazz) throws Exception
+   {
+      if (classExpr != null)
+         return Util.matchesClassExpr(classExpr, clazz, advisor);
+      else
+      {
+         TypeMatcher matcher = new TypeMatcher(advisor, clazz);
+         return ((Boolean) ast.jjtAccept(matcher, null)).booleanValue();
+      }
+   }
+
+   public boolean matches(Advisor advisor, Class clazz)
+   {
+      if (classExpr != null)
+         return Util.matchesClassExpr(classExpr, clazz, advisor);
+      else
+      {
+         TypeMatcher matcher = new TypeMatcher(advisor, clazz);
+         return ((Boolean) ast.jjtAccept(matcher, null)).booleanValue();
+      }
+   }
+}

Added: projects/aop/branches/arrays/aop/src/main/org/jboss/aop/instrument/ArrayAccessTransformer.java
===================================================================
--- projects/aop/branches/arrays/aop/src/main/org/jboss/aop/instrument/ArrayAccessTransformer.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/main/org/jboss/aop/instrument/ArrayAccessTransformer.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.aop.instrument;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ArrayAccessTransformer
+{
+
+}

Added: projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArrayAccess.java
===================================================================
--- projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArrayAccess.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArrayAccess.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,19 @@
+/* Generated By:JJTree: Do not edit this line. ASTArrayAccess.java */
+
+package org.jboss.aop.pointcut.ast;
+
+public class ASTArrayAccess extends SimpleNode {
+  public ASTArrayAccess(int id) {
+    super(id);
+  }
+
+  public ASTArrayAccess(PointcutExpressionParser p, int id) {
+    super(p, id);
+  }
+
+
+  /** Accept the visitor. **/
+  public Object jjtAccept(PointcutExpressionParserVisitor visitor, Object data) {
+    return visitor.visit(this, data);
+  }
+}

Added: projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArrayGet.java
===================================================================
--- projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArrayGet.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArrayGet.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,19 @@
+/* Generated By:JJTree: Do not edit this line. ASTArrayGet.java */
+
+package org.jboss.aop.pointcut.ast;
+
+public class ASTArrayGet extends SimpleNode {
+  public ASTArrayGet(int id) {
+    super(id);
+  }
+
+  public ASTArrayGet(PointcutExpressionParser p, int id) {
+    super(p, id);
+  }
+
+
+  /** Accept the visitor. **/
+  public Object jjtAccept(PointcutExpressionParserVisitor visitor, Object data) {
+    return visitor.visit(this, data);
+  }
+}

Added: projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArraySet.java
===================================================================
--- projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArraySet.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/ASTArraySet.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,19 @@
+/* Generated By:JJTree: Do not edit this line. ASTArraySet.java */
+
+package org.jboss.aop.pointcut.ast;
+
+public class ASTArraySet extends SimpleNode {
+  public ASTArraySet(int id) {
+    super(id);
+  }
+
+  public ASTArraySet(PointcutExpressionParser p, int id) {
+    super(p, id);
+  }
+
+
+  /** Accept the visitor. **/
+  public Object jjtAccept(PointcutExpressionParserVisitor visitor, Object data) {
+    return visitor.visit(this, data);
+  }
+}

Added: projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/pointcut.jj
===================================================================
--- projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/pointcut.jj	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/pointcut.jj	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,1546 @@
+/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. C:/cygwin/home/Kabir/sourcecontrol/jboss-aop/aop/src/main/org/jboss/aop/pointcut/ast\pointcut.jj */
+/*@egen*//**
+ *
+ */
+options {                                                           
+  STATIC=false;
+}
+
+PARSER_BEGIN(PointcutExpressionParser)
+package org.jboss.aop.pointcut.ast;
+
+import java.lang.reflect.Modifier;
+
+public class PointcutExpressionParser/*@bgen(jjtree)*/implements PointcutExpressionParserTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
+  protected JJTPointcutExpressionParserState jjtree = new JJTPointcutExpressionParserState();
+
+/*@egen*/
+  public static void main(String args[]) {
+    System.out.println("Reading from standard input...");
+    PointcutExpressionParser t = new PointcutExpressionParser(System.in);
+    try {
+      ASTStart n = t.Start();
+      //PointcutExpressionParserVisitor v = new PointcutExpressionDumpVisitor();
+      //n.jjtAccept(v, null);
+    } catch (Exception e) {
+      System.out.println("Oops.");
+      System.out.println(e.getMessage());
+      e.printStackTrace();
+    }
+  }
+}
+
+PARSER_END(PointcutExpressionParser)
+
+
+SKIP :
+{
+  " "
+| "\t"
+}
+
+TOKEN : /* IDENTIFIERS */
+{
+< AND: ["A","a"]["N","n"]["D","d"] >
+| < OR:  ["O","o"]["R","r"] >
+| < CALL: "call(" > : BEHAVIOR
+| < ALL: "all(" >  : FIELD_DECLARATION
+| < EXECUTION: "execution(" > : BEHAVIOR
+| < CONSTRUCTION: "construction(" > : BEHAVIOR
+| < HAS: "has(" > : BEHAVIOR
+| < HAS_FIELD: "hasfield(" > : FIELD_DECLARATION
+| < GET: "get(" > : FIELD_DECLARATION
+| < SET: "set(" > : FIELD_DECLARATION
+| < FIELD: "field(" > : FIELD_DECLARATION
+| < ARRAYGET: "arrayget(" > : FIELD_DECLARATION
+| < ARRAYSET: "arrayset(" > : FIELD_DECLARATION
+| < ARRAYACCESS: "array(" > : FIELD_DECLARATION
+| < WITHIN: "within(" > : FIELD_DECLARATION
+| < WITHINCODE: "withincode(" > : BEHAVIOR
+| < POINTCUT: <POINTCUT_IDENTIFIER> (<POINTCUT_DOT> <POINTCUT_IDENTIFIER>)*>
+| < POINTCUT_IDENTIFIER: (<POINTCUT_WILD_LETTER>)+ >
+|
+  < #POINTCUT_WILD_LETTER: ["_","a"-"z","A"-"Z","0"-"9"] >
+|
+  < #POINTCUT_DOT: ["."] >
+| <NOT: "!">
+}
+
+<PARAMS> SKIP :
+{
+  " "
+| "\t"
+}
+
+<PARAMS> TOKEN:
+{
+  < ALL_PARAMS: ".." >
+|
+  < PARAM_CLASS: <PARAM_IDENTIFIER> (<PARAM_DOT> <PARAM_IDENTIFIER>)+ (<PARAM_ARRAY>)*>
+|
+  < PARAM_ARRAY_CLASS: <PARAM_IDENTIFIER> (<PARAM_ARRAY>)+>
+|
+  < PARAM_ANNOTATION: "@" <PARAM_IDENTIFIER> (<PARAM_DOT> <PARAM_IDENTIFIER>)+ >
+|
+  < PARAM_INSTANCEOF: "$instanceof{" (<PARAM_IDENTIFIER> | <PARAM_CLASS> | <PARAM_ANNOTATION>) "}">
+|
+  < PARAM_TYPEDEF: "$typedef{" <POINTCUT> "}">
+|
+  < PARAM_IDENTIFIER: (<PARAM_WILD_LETTER>)+ >
+|
+  < COMMA: "," >
+|
+  < #PARAM_WILD_LETTER: ["$", "*","_","a"-"z","A"-"Z","0"-"9"] >
+|
+  < #PARAM_DOT: ["."] >
+|
+  < #PARAM_ARRAY: "[]" >
+| <PARAMS_CLOSE: ")"> : BEHAVIOR
+}
+
+
+<BEHAVIOR> SKIP :
+{
+  " "
+| "\t"
+}
+
+<BEHAVIOR> TOKEN : /* IDENTIFIERS */
+{
+  < ABSTRACT: "abstract" >
+| < FINAL: "final" >
+| < PRIVATE: "private" >
+| < PROTECTED: "protected" >
+| < PUBLIC: "public" >
+| < STATIC: "static" >
+| < NATIVE: "native" >
+| < SYNCHRONIZED: "synchronized" >
+| < NEW: "new" >
+| < THROWS: "throws" >
+|
+  < INSTANCEOF: "$instanceof{" (<IDENTIFIER> | <CLASS> | <ANNOTATION>) "}">
+|
+  < TYPEDEF: "$typedef{" <POINTCUT> "}">
+|
+  < CLASS: <IDENTIFIER> (<DOT> <IDENTIFIER>)+ (<ARRAY>)*>
+| 
+  < EXCEPTION_SEPERATOR: "," >
+|
+  < ARRAY_CLASS: <IDENTIFIER> (<ARRAY>)+>
+|
+  < ANNOTATION: "@" <IDENTIFIER> (<DOT> <IDENTIFIER>)*>
+|
+  <IMPLEMENTS: "$implements{" (<CLASS> | <ANNOTATION>) "}">
+|
+  <IMPLEMENTING: "$implementing{" (<CLASS> | <ANNOTATION>) "}">
+|
+  < IDENTIFIER: (<WILD_LETTER>)+ >
+|
+  < #WILD_LETTER: ["$","*","_","a"-"z","A"-"Z","0"-"9"] >
+|
+  < #DOT: ["."] >
+|
+  < #ARRAY: "[]" >
+| < SEPARATOR: "->" >
+| <BEHAVIOR_NOT: "!">
+| < PARAMS_OPEN: "("> : PARAMS
+| <BEHAVIOR_CLOSE: ")"> : DEFAULT
+}
+
+<FIELD_DECLARATION> SKIP :
+{
+  " "
+| "\t"
+}
+
+<FIELD_DECLARATION> TOKEN : /* IDENTIFIERS */
+{
+  < FIELD_ABSTRACT: "abstract" >
+| < FIELD_FINAL: "final" >
+| < FIELD_PRIVATE: "private" >
+| < FIELD_PROTECTED: "protected" >
+| < FIELD_PUBLIC: "public" >
+| < FIELD_STATIC: "static" >
+| < FIELD_TRANSIENT: "transient" >
+| < FIELD_NATIVE: "native" >
+| < FIELD_SYNCHRONIZED: "synchronized" >
+|
+  < FIELD_INSTANCEOF: "$instanceof{" (<FIELD_IDENTIFIER> | <FIELD_CLASS> | <FIELD_ANNOTATION>) "}">
+|
+  < FIELD_TYPEDEF: "$typedef{" <POINTCUT> "}">
+|
+  < FIELD_CLASS: <FIELD_IDENTIFIER> (<FIELD_DOT> <FIELD_IDENTIFIER>)+ (<FIELD_ARRAY>)*>
+|
+  < FIELD_ARRAY_CLASS: <FIELD_IDENTIFIER> (<FIELD_ARRAY>)+>
+|
+  < FIELD_ANNOTATION: "@" <FIELD_IDENTIFIER> (<FIELD_DOT> <FIELD_IDENTIFIER>)* >
+|
+  < FIELD_IDENTIFIER: (<FIELD_WILD_LETTER>)+ >
+|
+  < #FIELD_WILD_LETTER: ["$","*","_","a"-"z","A"-"Z","0"-"9"] >
+|
+  < #FIELD_DOT: ["."] >
+|
+  < #FIELD_ARRAY: "[]" >
+| < FIELD_SEPARATOR: "->" >
+| < FIELD_NOT: "!" >
+| <FIELD_CLOSE: ")"> : DEFAULT
+}
+
+ASTStart Start()        : {/*@bgen(jjtree) Start */
+  ASTStart jjtn000 = new ASTStart(JJTSTART);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Start */
+  try {
+/*@egen*/
+  Expression() <EOF>/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  { return jjtn000; }/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+ASTExecution execution()                : {/*@bgen(jjtree) ExecutionOnly */
+  ASTExecutionOnly jjtn000 = new ASTExecutionOnly(JJTEXECUTIONONLY);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) ExecutionOnly */
+  try {
+/*@egen*/
+  Execution() <EOF>/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  { return (ASTExecution)jjtn000.jjtGetChild(0); }/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Expression()       : {}
+{
+  LOOKAHEAD(234234234) BooleanExpression() | Concrete() |  Not()
+}
+
+void BooleanExpression()          : {/*@bgen(jjtree) Boolean */
+  ASTBoolean jjtn000 = new ASTBoolean(JJTBOOLEAN);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Boolean */
+   try {
+/*@egen*/
+   LOOKAHEAD(3) SubExpression() | LOOKAHEAD(3) CompositeExpression()/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void CompositeExpression()            : {/*@bgen(jjtree) Composite */
+  ASTComposite jjtn000 = new ASTComposite(JJTCOMPOSITE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Composite */
+   try {
+/*@egen*/
+   "(" SubExpression() ")"/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Not()      : {/*@bgen(jjtree) Not */
+  ASTNot jjtn000 = new ASTNot(JJTNOT);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Not */
+   try {
+/*@egen*/
+   <NOT> (LOOKAHEAD(3) ConcreteExpression() | LOOKAHEAD(3) CompositeExpression())/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void SubExpression()      : {/*@bgen(jjtree) Sub */
+  ASTSub jjtn000 = new ASTSub(JJTSUB);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Sub */
+  try {
+/*@egen*/
+  (LOOKAHEAD(3) Not() | LOOKAHEAD(3) ConcreteExpression() | LOOKAHEAD(3) CompositeExpression() ) ( And() | Or())+/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void And()      : {/*@bgen(jjtree) And */
+  ASTAnd jjtn000 = new ASTAnd(JJTAND);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) And */
+  try {
+/*@egen*/
+  <AND> (LOOKAHEAD(3) ConcreteExpression() | LOOKAHEAD(3) CompositeExpression() | LOOKAHEAD(3) Not())/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Or()     : {/*@bgen(jjtree) Or */
+  ASTOr jjtn000 = new ASTOr(JJTOR);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Or */
+  try {
+/*@egen*/
+  <OR> (LOOKAHEAD(3) ConcreteExpression() | LOOKAHEAD(3) CompositeExpression() | LOOKAHEAD(3) Not())/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+ASTCFlowExpression CFlowExpression()                  : {/*@bgen(jjtree) CFlowExpression */
+  ASTCFlowExpression jjtn000 = new ASTCFlowExpression(JJTCFLOWEXPRESSION);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) CFlowExpression */
+  try {
+/*@egen*/
+  (LOOKAHEAD(3) CFlowBoolean() | LOOKAHEAD(3) CFlow() |  LOOKAHEAD(3) NotCFlow()) <EOF>/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  { return jjtn000; }/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void CFlowBoolean()               : {/*@bgen(jjtree) CFlowBoolean */
+  ASTCFlowBoolean jjtn000 = new ASTCFlowBoolean(JJTCFLOWBOOLEAN);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) CFlowBoolean */
+   try {
+/*@egen*/
+   CompositeCFlow()/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void NotCFlow()           : {/*@bgen(jjtree) NotCFlow */
+  ASTNotCFlow jjtn000 = new ASTNotCFlow(JJTNOTCFLOW);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) NotCFlow */
+   try {
+/*@egen*/
+   <NOT> (LOOKAHEAD(3) CFlow() | LOOKAHEAD(3) CompositeCFlow())/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void CompositeCFlow()                 : {/*@bgen(jjtree) CompositeCFlow */
+  ASTCompositeCFlow jjtn000 = new ASTCompositeCFlow(JJTCOMPOSITECFLOW);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) CompositeCFlow */
+   try {
+/*@egen*/
+   "(" SubCFlow() ")"/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void SubCFlow()           : {/*@bgen(jjtree) SubCFlow */
+  ASTSubCFlow jjtn000 = new ASTSubCFlow(JJTSUBCFLOW);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) SubCFlow */
+   try {
+/*@egen*/
+   (LOOKAHEAD(3) NotCFlow() | LOOKAHEAD(3) CFlow()) ( AndCFlow() | OrCFlow())+/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void AndCFlow()           : {/*@bgen(jjtree) AndCFlow */
+  ASTAndCFlow jjtn000 = new ASTAndCFlow(JJTANDCFLOW);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) AndCFlow */
+  try {
+/*@egen*/
+  <AND> (LOOKAHEAD(3) CFlow() | LOOKAHEAD(3) CompositeCFlow())/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void OrCFlow()          : {/*@bgen(jjtree) OrCFlow */
+  ASTOrCFlow jjtn000 = new ASTOrCFlow(JJTORCFLOW);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) OrCFlow */
+  try {
+/*@egen*/
+  <OR> (LOOKAHEAD(3) CFlow() | LOOKAHEAD(3) CompositeCFlow())/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void ConcreteExpression()       : {}
+{
+  Concrete()
+}
+
+void Concrete()       : {}
+{
+   ( LOOKAHEAD(4) Call() | LOOKAHEAD(4) Within() | LOOKAHEAD(4) Withincode() | LOOKAHEAD(4) Execution() | LOOKAHEAD(4) Construction() | LOOKAHEAD(4) Set() | LOOKAHEAD(4) Get() | LOOKAHEAD(4) FieldExecution() | LOOKAHEAD(4) ArraySet() | LOOKAHEAD(4) ArrayGet() | LOOKAHEAD(4) ArrayAccess() | LOOKAHEAD(4) Pointcut() | LOOKAHEAD(4) All()| LOOKAHEAD(4) Has()| LOOKAHEAD(4) HasField())
+}
+
+void Pointcut()           :
+{/*@bgen(jjtree) Pointcut */
+  ASTPointcut jjtn000 = new ASTPointcut(JJTPOINTCUT);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token pointcut;
+}
+{/*@bgen(jjtree) Pointcut */
+   try {
+/*@egen*/
+   pointcut=<POINTCUT>/*@bgen(jjtree)*/
+   {
+     jjtree.closeNodeScope(jjtn000, true);
+     jjtc000 = false;
+   }
+/*@egen*/
+   {
+      jjtn000.setPointcutName(pointcut.image);
+   }/*@bgen(jjtree)*/
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void CFlow()        :
+{/*@bgen(jjtree) CFlow */
+  ASTCFlow jjtn000 = new ASTCFlow(JJTCFLOW);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token pointcut;
+}
+{/*@bgen(jjtree) CFlow */
+   try {
+/*@egen*/
+   pointcut=<POINTCUT>/*@bgen(jjtree)*/
+   {
+     jjtree.closeNodeScope(jjtn000, true);
+     jjtc000 = false;
+   }
+/*@egen*/
+   {
+      jjtn000.setPointcutName(pointcut.image);
+   }/*@bgen(jjtree)*/
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void All()      :
+{/*@bgen(jjtree) All */
+  ASTAll jjtn000 = new ASTAll(JJTALL);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token pointcut;
+}
+{/*@bgen(jjtree) All */
+   try {
+/*@egen*/
+   <ALL>
+
+   (pointcut=<FIELD_CLASS>|pointcut=<FIELD_IDENTIFIER>|pointcut=<FIELD_ANNOTATION>|pointcut=<FIELD_INSTANCEOF>|pointcut=<FIELD_TYPEDEF>)
+   {
+      jjtn000.setClassExpression(pointcut.image);
+   }
+
+   <FIELD_CLOSE>/*@bgen(jjtree)*/
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Call()       : {/*@bgen(jjtree) Call */
+  ASTCall jjtn000 = new ASTCall(JJTCALL);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Call */
+   try {
+/*@egen*/
+   <CALL> (LOOKAHEAD(4) Method() | LOOKAHEAD(4) Constructor()) <BEHAVIOR_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Within()         :
+{/*@bgen(jjtree) Within */
+   ASTWithin jjtn000 = new ASTWithin(JJTWITHIN);
+   boolean jjtc000 = true;
+   jjtree.openNodeScope(jjtn000);
+/*@egen*/
+   Token clazz;
+}
+{/*@bgen(jjtree) Within */
+  try {
+/*@egen*/
+  <WITHIN>
+  (clazz=<FIELD_CLASS> | clazz=<FIELD_IDENTIFIER> | clazz=<FIELD_ANNOTATION> | clazz=<FIELD_INSTANCEOF>| clazz=<FIELD_TYPEDEF>)
+  <FIELD_CLOSE>/*@bgen(jjtree)*/
+   {
+     jjtree.closeNodeScope(jjtn000, true);
+     jjtc000 = false;
+   }
+/*@egen*/
+   { jjtn000.setClassExpression(clazz.image); }/*@bgen(jjtree)*/
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Withincode()             : {/*@bgen(jjtree) Withincode */
+  ASTWithincode jjtn000 = new ASTWithincode(JJTWITHINCODE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Withincode */
+   try {
+/*@egen*/
+   <WITHINCODE> (LOOKAHEAD(3) Method() | LOOKAHEAD(3) Constructor()) <BEHAVIOR_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Execution()            : {/*@bgen(jjtree) Execution */
+  ASTExecution jjtn000 = new ASTExecution(JJTEXECUTION);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Execution */
+   try {
+/*@egen*/
+   <EXECUTION> (LOOKAHEAD(3) Method() | LOOKAHEAD(3) Constructor()) <BEHAVIOR_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Construction()               : {/*@bgen(jjtree) Construction */
+  ASTConstruction jjtn000 = new ASTConstruction(JJTCONSTRUCTION);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Construction */
+   try {
+/*@egen*/
+   <CONSTRUCTION> (Constructor()) <BEHAVIOR_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Has()      : {/*@bgen(jjtree) Has */
+  ASTHas jjtn000 = new ASTHas(JJTHAS);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Has */
+   try {
+/*@egen*/
+   <HAS> (LOOKAHEAD(4) Method() | LOOKAHEAD(4) Constructor()) <BEHAVIOR_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void HasField()           : {/*@bgen(jjtree) HasField */
+  ASTHasField jjtn000 = new ASTHasField(JJTHASFIELD);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) HasField */
+   try {
+/*@egen*/
+   <HAS_FIELD> Field() <FIELD_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Get()      : {/*@bgen(jjtree) Get */
+  ASTGet jjtn000 = new ASTGet(JJTGET);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Get */
+   try {
+/*@egen*/
+   <GET> Field() <FIELD_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Set()      : {/*@bgen(jjtree) Set */
+  ASTSet jjtn000 = new ASTSet(JJTSET);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Set */
+   try {
+/*@egen*/
+   <SET> Field() <FIELD_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void FieldExecution()                 : {/*@bgen(jjtree) FieldExecution */
+  ASTFieldExecution jjtn000 = new ASTFieldExecution(JJTFIELDEXECUTION);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) FieldExecution */
+   try {
+/*@egen*/
+   <FIELD> Field() <FIELD_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void ArrayGet()           : {/*@bgen(jjtree) ArrayGet */
+  ASTArrayGet jjtn000 = new ASTArrayGet(JJTARRAYGET);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) ArrayGet */
+   try {
+/*@egen*/
+   <ARRAYGET> Field() <FIELD_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void ArraySet()           : {/*@bgen(jjtree) ArraySet */
+  ASTArraySet jjtn000 = new ASTArraySet(JJTARRAYSET);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) ArraySet */
+   try {
+/*@egen*/
+   <ARRAYSET> Field() <FIELD_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void ArrayAccess()              : {/*@bgen(jjtree) ArrayAccess */
+  ASTArrayAccess jjtn000 = new ASTArrayAccess(JJTARRAYACCESS);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) ArrayAccess */
+   try {
+/*@egen*/
+   <ARRAYACCESS> Field() <FIELD_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Method()         :
+{/*@bgen(jjtree) Method */
+  ASTMethod jjtn000 = new ASTMethod(JJTMETHOD);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token ret, clazz, body;
+}
+{/*@bgen(jjtree) Method */
+  try {
+/*@egen*/
+  (Attribute())* (ret=<CLASS>|ret=<IDENTIFIER>|ret=<ANNOTATION>|ret=<ARRAY_CLASS>|ret=<INSTANCEOF>|ret=<TYPEDEF>) (clazz=<CLASS>|clazz=<IDENTIFIER>|clazz=<ANNOTATION>|clazz=<INSTANCEOF>|clazz=<TYPEDEF>) <SEPARATOR> (body=<IDENTIFIER>|body=<ANNOTATION>|body=<IMPLEMENTS>|body=<IMPLEMENTING>) Parameters() Throws()/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  {
+    jjtn000.setReturnTypeExpression(ret.image);
+    jjtn000.setClassExpression(clazz.image);
+    jjtn000.setMethodExpression(body.image);
+  }/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Throws()       : {}
+{
+   (<THROWS> Exception() (<EXCEPTION_SEPERATOR> Exception())*)?
+}
+
+void Exception()           : 
+{/*@bgen(jjtree) Exception */
+   ASTException jjtn000 = new ASTException(JJTEXCEPTION);
+   boolean jjtc000 = true;
+   jjtree.openNodeScope(jjtn000);
+/*@egen*/
+   Token ex;
+}
+{/*@bgen(jjtree) Exception */
+        try {
+/*@egen*/
+	(ex=<CLASS> | ex=<IDENTIFIER>)/*@bgen(jjtree)*/
+        {
+          jjtree.closeNodeScope(jjtn000, true);
+          jjtc000 = false;
+        }
+/*@egen*/
+	{
+		jjtn000.setTypeExpression(ex.image);
+	}/*@bgen(jjtree)*/
+        } finally {
+          if (jjtc000) {
+            jjtree.closeNodeScope(jjtn000, true);
+          }
+        }
+/*@egen*/
+}
+
+void Attribute()            :
+{/*@bgen(jjtree) Attribute */
+  ASTAttribute jjtn000 = new ASTAttribute(JJTATTRIBUTE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+}
+{/*@bgen(jjtree) Attribute */
+  try {
+/*@egen*/
+  [<BEHAVIOR_NOT> { jjtn000.not=true; } ]
+  (<PUBLIC>/*@bgen(jjtree)*/
+            {
+              jjtree.closeNodeScope(jjtn000, true);
+              jjtc000 = false;
+            }
+/*@egen*/ { jjtn000.setValue(Modifier.PUBLIC); } | <PROTECTED>/*@bgen(jjtree)*/
+                                                                 {
+                                                                   jjtree.closeNodeScope(jjtn000, true);
+                                                                   jjtc000 = false;
+                                                                 }
+/*@egen*/ { jjtn000.setValue(Modifier.PROTECTED); } | <PRIVATE>/*@bgen(jjtree)*/
+                                                                                                                       {
+                                                                                                                         jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                         jjtc000 = false;
+                                                                                                                       }
+/*@egen*/ { jjtn000.setValue(Modifier.PRIVATE); } | <STATIC>/*@bgen(jjtree)*/
+                                                                                                                                                                          {
+                                                                                                                                                                            jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                            jjtc000 = false;
+                                                                                                                                                                          }
+/*@egen*/ { jjtn000.setValue(Modifier.STATIC); } | <ABSTRACT>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                              {
+                                                                                                                                                                                                                                jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                jjtc000 = false;
+                                                                                                                                                                                                                              }
+/*@egen*/ { jjtn000.setValue(Modifier.ABSTRACT); } | <FINAL>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                                                                                 {
+                                                                                                                                                                                                                                                                                   jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                                                                   jjtc000 = false;
+                                                                                                                                                                                                                                                                                 }
+/*@egen*/ { jjtn000.setValue(Modifier.FINAL); } | <NATIVE>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                                                                                                                                  {
+                                                                                                                                                                                                                                                                                                                                    jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                                                                                                                    jjtc000 = false;
+                                                                                                                                                                                                                                                                                                                                  }
+/*@egen*/ { jjtn000.setValue(Modifier.NATIVE); } | <SYNCHRONIZED>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                                                                                                                                                                                          {
+                                                                                                                                                                                                                                                                                                                                                                                            jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                                                                                                                                                                            jjtc000 = false;
+                                                                                                                                                                                                                                                                                                                                                                                          }
+/*@egen*/ { jjtn000.setValue(Modifier.SYNCHRONIZED); })/*@bgen(jjtree)*/
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Constructor()              :
+{/*@bgen(jjtree) Constructor */
+  ASTConstructor jjtn000 = new ASTConstructor(JJTCONSTRUCTOR);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token clazz, danew;
+}
+{/*@bgen(jjtree) Constructor */
+  try {
+/*@egen*/
+  (ConstructorAttribute())* (clazz=<CLASS> | clazz=<IDENTIFIER> | clazz=<ANNOTATION> | clazz=<INSTANCEOF> | clazz=<TYPEDEF>)
+  {
+    jjtn000.setClassExpression(clazz.image);
+  }
+  <SEPARATOR> (danew=<NEW> | danew=<ANNOTATION>) Parameters() Throws()/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  {
+    jjtn000.setNewExpression(danew.image);
+  }/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void ConstructorAttribute()            :
+{/*@bgen(jjtree) Attribute */
+  ASTAttribute jjtn000 = new ASTAttribute(JJTATTRIBUTE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+}
+{/*@bgen(jjtree) Attribute */
+  try {
+/*@egen*/
+  <PUBLIC>/*@bgen(jjtree)*/
+           {
+             jjtree.closeNodeScope(jjtn000, true);
+             jjtc000 = false;
+           }
+/*@egen*/ { jjtn000.setValue(Modifier.PUBLIC); } | <PROTECTED>/*@bgen(jjtree)*/
+                                                                {
+                                                                  jjtree.closeNodeScope(jjtn000, true);
+                                                                  jjtc000 = false;
+                                                                }
+/*@egen*/ { jjtn000.setValue(Modifier.PROTECTED); } | <PRIVATE>/*@bgen(jjtree)*/
+                                                                                                                      {
+                                                                                                                        jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                        jjtc000 = false;
+                                                                                                                      }
+/*@egen*/ { jjtn000.setValue(Modifier.PRIVATE); }/*@bgen(jjtree)*/
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Parameters()       :
+{
+}
+{
+   (LOOKAHEAD(3) <PARAMS_OPEN> AllParams()<PARAMS_CLOSE> | LOOKAHEAD(3) <PARAMS_OPEN> [Parameter() ( <COMMA> Parameter() )* ] <PARAMS_CLOSE>)
+}
+
+void Parameter()            :
+{/*@bgen(jjtree) Parameter */
+  ASTParameter jjtn000 = new ASTParameter(JJTPARAMETER);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token t;
+}
+{/*@bgen(jjtree) Parameter */
+  try {
+/*@egen*/
+  (t=<ALL_PARAMS> | t=<PARAM_CLASS> | t=<PARAM_IDENTIFIER> | t=<PARAM_ARRAY_CLASS> | t=<PARAM_ANNOTATION> | t=<PARAM_TYPEDEF> | t=<PARAM_INSTANCEOF>)/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  {
+    jjtn000.setTypeExpression(t.image);
+  }/*@bgen(jjtree)*/
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void AllParams()               :
+{/*@bgen(jjtree) AllParameter */
+  ASTAllParameter jjtn000 = new ASTAllParameter(JJTALLPARAMETER);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+}
+{/*@bgen(jjtree) AllParameter */
+   try {
+/*@egen*/
+   <ALL_PARAMS>/*@bgen(jjtree)*/
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Field()        :
+{/*@bgen(jjtree) Field */
+  ASTField jjtn000 = new ASTField(JJTFIELD);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token type, clazz, body;
+}
+{/*@bgen(jjtree) Field */
+  try {
+/*@egen*/
+  (FieldAttribute())*
+  (type=<FIELD_CLASS> | type=<FIELD_IDENTIFIER> | type=<FIELD_ANNOTATION> | type=<FIELD_ARRAY_CLASS>| type=<FIELD_INSTANCEOF> | type=<FIELD_TYPEDEF>)
+  {
+    jjtn000.setTypeExpression(type.image);
+  }
+  (clazz=<FIELD_CLASS> | clazz=<FIELD_IDENTIFIER> | clazz=<FIELD_ANNOTATION> | clazz=<FIELD_INSTANCEOF> | clazz=<FIELD_TYPEDEF>)
+  {
+    jjtn000.setClassExpr(clazz.image);
+  }
+  <FIELD_SEPARATOR>
+  (body=<FIELD_IDENTIFIER> | body=<FIELD_ANNOTATION>)/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  {
+    jjtn000.setFieldExpr(body.image);
+  }/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void FieldAttribute()            :
+{/*@bgen(jjtree) Attribute */
+  ASTAttribute jjtn000 = new ASTAttribute(JJTATTRIBUTE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+}
+{/*@bgen(jjtree) Attribute */
+  try {
+/*@egen*/
+  [<FIELD_NOT> { jjtn000.not = true; }]
+  (<FIELD_PUBLIC>/*@bgen(jjtree)*/
+                  {
+                    jjtree.closeNodeScope(jjtn000, true);
+                    jjtc000 = false;
+                  }
+/*@egen*/ { jjtn000.setValue(Modifier.PUBLIC); } | <FIELD_PROTECTED>/*@bgen(jjtree)*/
+                                                                             {
+                                                                               jjtree.closeNodeScope(jjtn000, true);
+                                                                               jjtc000 = false;
+                                                                             }
+/*@egen*/ { jjtn000.setValue(Modifier.PROTECTED); } | <FIELD_PRIVATE>/*@bgen(jjtree)*/
+                                                                                                                                         {
+                                                                                                                                           jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                           jjtc000 = false;
+                                                                                                                                         }
+/*@egen*/ { jjtn000.setValue(Modifier.PRIVATE); } | <FIELD_STATIC>/*@bgen(jjtree)*/
+                                                                                                                                                                                                  {
+                                                                                                                                                                                                    jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                    jjtc000 = false;
+                                                                                                                                                                                                  }
+/*@egen*/ { jjtn000.setValue(Modifier.STATIC); } | <FIELD_FINAL>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                                                         {
+                                                                                                                                                                                                                                                           jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                                           jjtc000 = false;
+                                                                                                                                                                                                                                                         }
+/*@egen*/ { jjtn000.setValue(Modifier.FINAL); } | <FIELD_TRANSIENT>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                                                                                                                   {
+                                                                                                                                                                                                                                                                                                                     jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                                                                                                     jjtc000 = false;
+                                                                                                                                                                                                                                                                                                                   }
+/*@egen*/ { jjtn000.setValue(Modifier.TRANSIENT); } )/*@bgen(jjtree)*/
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+
+
+

Added: projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/typeExpression.jj
===================================================================
--- projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/typeExpression.jj	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/main/org/jboss/aop/pointcut/ast/typeExpression.jj	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,876 @@
+/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. C:/cygwin/home/Kabir/sourcecontrol/jboss-aop/aop/src/main/org/jboss/aop/pointcut/ast\typeExpression.jj */
+/*@egen*//**
+ *
+ */
+options {                                                           
+  STATIC=false;
+}
+
+PARSER_BEGIN(TypeExpressionParser)
+package org.jboss.aop.pointcut.ast;
+
+import java.lang.reflect.Modifier;
+
+public class TypeExpressionParser/*@bgen(jjtree)*/implements TypeExpressionParserTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
+  protected JJTTypeExpressionParserState jjtree = new JJTTypeExpressionParserState();
+
+/*@egen*/
+}
+
+PARSER_END(TypeExpressionParser)
+
+
+SKIP :
+{
+  " "
+| "\t"
+}
+
+TOKEN : /* IDENTIFIERS */
+{
+< AND: ["A","a"]["N","n"]["D","d"] >
+| < OR:  ["O","o"]["R","r"] >
+| < HAS: "has(" > : BEHAVIOR
+| < HAS_FIELD: "hasfield(" > : FIELD_DECLARATION
+| < FIELD: "field(" > : FIELD_DECLARATION
+| < CLASS_EXPR: "class(" > : FIELD_DECLARATION
+| < METHOD_EXPR: "method(" > : BEHAVIOR
+| < CONSTRUCTOR_EXPR: "constructor(" > : BEHAVIOR
+| <NOT: "!">
+}
+
+<PARAMS> SKIP :
+{
+  " "
+| "\t"
+}
+
+<PARAMS> TOKEN:
+{
+  < ALL_PARAMS: ".." >
+|
+  < PARAM_INSTANCEOF: "$instanceof{" (<PARAM_IDENTIFIER> | <PARAM_CLASS> | <PARAM_ANNOTATION>) "}">
+|
+  < PARAM_TYPEDEF: "$typedef{" (<PARAM_IDENTIFIER> | <PARAM_CLASS>) "}">
+|
+  < PARAM_CLASS: <PARAM_IDENTIFIER> (<PARAM_DOT> <PARAM_IDENTIFIER>)+ (<PARAM_ARRAY>)*>
+|
+  < PARAM_ARRAY_CLASS: <PARAM_IDENTIFIER> (<PARAM_ARRAY>)+>
+|
+  < PARAM_ANNOTATION: "@" <PARAM_IDENTIFIER> (<DOT> <IDENTIFIER>)*>
+|
+  < PARAM_IDENTIFIER: (<PARAM_WILD_LETTER>)+ >
+|
+  < COMMA: "," >
+|
+  < #PARAM_WILD_LETTER: ["*","_","a"-"z","A"-"Z","0"-"9"] >
+|
+  < #PARAM_DOT: ["."] >
+|
+  < #PARAM_ARRAY: "[]" >
+| <PARAMS_CLOSE: ")"> : BEHAVIOR
+}
+
+
+<BEHAVIOR> SKIP :
+{
+  " "
+| "\t"
+}
+
+<BEHAVIOR> TOKEN : /* IDENTIFIERS */
+{
+  < ABSTRACT: "abstract" >
+| < FINAL: "final" >
+| < PRIVATE: "private" >
+| < PROTECTED: "protected" >
+| < PUBLIC: "public" >
+| < STATIC: "static" >
+| < NATIVE: "native" >
+| < SYNCHRONIZED: "synchronized" >
+| < NEW: "new" >
+| < THROWS: "throws" >
+|
+  < INSTANCEOF: "$instanceof{" (<IDENTIFIER> | <CLASS> | <ANNOTATION>) "}">
+|
+  < TYPEDEF: "$typedef{" (<IDENTIFIER> | <CLASS>) "}">
+|
+  < CLASS: <IDENTIFIER> (<DOT> <IDENTIFIER>)+ (<ARRAY>)*>
+|
+  < ARRAY_CLASS: <IDENTIFIER> (<ARRAY>)+>
+|
+  < ANNOTATION: "@" <IDENTIFIER> (<DOT> <IDENTIFIER>)*>
+|
+  < IDENTIFIER: (<WILD_LETTER>)+ >
+|
+  < #WILD_LETTER: ["$","*","_","a"-"z","A"-"Z","0"-"9"] >
+|
+  < #DOT: ["."] >
+|
+  < EXCEPTION_SEPERATOR: "," >
+|
+  < #ARRAY: "[]" >
+| < SEPARATOR: "->" >
+| <BEHAVIOR_NOT: "!">
+| < PARAMS_OPEN: "("> : PARAMS
+| <BEHAVIOR_CLOSE: ")"> : DEFAULT
+}
+
+<FIELD_DECLARATION> SKIP :
+{
+  " "
+| "\t"
+}
+
+<FIELD_DECLARATION> TOKEN : /* IDENTIFIERS */
+{
+  < FIELD_ABSTRACT: "abstract" >
+| < FIELD_FINAL: "final" >
+| < FIELD_PRIVATE: "private" >
+| < FIELD_PROTECTED: "protected" >
+| < FIELD_PUBLIC: "public" >
+| < FIELD_STATIC: "static" >
+| < FIELD_TRANSIENT: "transient" >
+| < FIELD_NATIVE: "native" >
+| < FIELD_SYNCHRONIZED: "synchronized" >
+|
+  < FIELD_INSTANCEOF: "$instanceof{" (<FIELD_IDENTIFIER> | <FIELD_CLASS> | <FIELD_ANNOTATION>) "}">
+|
+  < FIELD_TYPEDEF: "$typedef{" (<FIELD_IDENTIFIER> | <FIELD_CLASS>) "}">
+|
+  < FIELD_CLASS: <FIELD_IDENTIFIER> (<FIELD_DOT> <FIELD_IDENTIFIER>)+ (<FIELD_ARRAY>)*>
+|
+  < FIELD_ARRAY_CLASS: <FIELD_IDENTIFIER> (<FIELD_ARRAY>)+>
+|
+  < FIELD_ANNOTATION: "@" <FIELD_IDENTIFIER> (<FIELD_DOT> <FIELD_IDENTIFIER>)* >
+|
+  < FIELD_IDENTIFIER: (<FIELD_WILD_LETTER>)+ >
+|
+  < #FIELD_WILD_LETTER: ["$","*","_","a"-"z","A"-"Z","0"-"9"] >
+|
+  < #FIELD_DOT: ["."] >
+|
+  < #FIELD_ARRAY: "[]" >
+| < FIELD_SEPARATOR: "->" >
+| < FIELD_NOT: "!" >
+| <FIELD_CLOSE: ")"> : DEFAULT
+}
+
+ASTStart Start()        : {/*@bgen(jjtree) Start */
+  ASTStart jjtn000 = new ASTStart(JJTSTART);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Start */
+  try {
+/*@egen*/
+  Expression() <EOF>/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  { return jjtn000; }/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Expression()       : {}
+{
+  LOOKAHEAD(234234234) BooleanExpression() | Concrete() |  Not()
+}
+
+void BooleanExpression()          : {/*@bgen(jjtree) Boolean */
+  ASTBoolean jjtn000 = new ASTBoolean(JJTBOOLEAN);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Boolean */
+   try {
+/*@egen*/
+   LOOKAHEAD(3) SubExpression() | LOOKAHEAD(3) CompositeExpression()/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void CompositeExpression()            : {/*@bgen(jjtree) Composite */
+  ASTComposite jjtn000 = new ASTComposite(JJTCOMPOSITE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Composite */
+   try {
+/*@egen*/
+   "(" SubExpression() ")"/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Not()      : {/*@bgen(jjtree) Not */
+  ASTNot jjtn000 = new ASTNot(JJTNOT);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Not */
+   try {
+/*@egen*/
+   <NOT> (LOOKAHEAD(3) ConcreteExpression() | LOOKAHEAD(3) CompositeExpression())/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void SubExpression()      : {/*@bgen(jjtree) Sub */
+  ASTSub jjtn000 = new ASTSub(JJTSUB);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Sub */
+  try {
+/*@egen*/
+  (LOOKAHEAD(3) Not() | LOOKAHEAD(3) ConcreteExpression() | LOOKAHEAD(3) CompositeExpression() ) ( And() | Or())+/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void And()      : {/*@bgen(jjtree) And */
+  ASTAnd jjtn000 = new ASTAnd(JJTAND);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) And */
+  try {
+/*@egen*/
+  <AND> (LOOKAHEAD(3) ConcreteExpression() | LOOKAHEAD(3) CompositeExpression() | LOOKAHEAD(3) Not())/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Or()     : {/*@bgen(jjtree) Or */
+  ASTOr jjtn000 = new ASTOr(JJTOR);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Or */
+  try {
+/*@egen*/
+  <OR> (LOOKAHEAD(3) ConcreteExpression() | LOOKAHEAD(3) CompositeExpression() | LOOKAHEAD(3) Not())/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void ConcreteExpression()       : {}
+{
+  Concrete()
+}
+
+void Concrete()       : {}
+{
+   (LOOKAHEAD(4) Class() | LOOKAHEAD(4) MethodWrapper() | LOOKAHEAD(4) FieldWrapper() | LOOKAHEAD(4) ConstructorWrapper() | LOOKAHEAD(4) Has() | LOOKAHEAD(4) HasField())
+}
+
+void Has()      : {/*@bgen(jjtree) Has */
+  ASTHas jjtn000 = new ASTHas(JJTHAS);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) Has */
+   try {
+/*@egen*/
+   <HAS> (LOOKAHEAD(4) Method() | LOOKAHEAD(4) Constructor()) <BEHAVIOR_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void HasField()           : {/*@bgen(jjtree) HasField */
+  ASTHasField jjtn000 = new ASTHasField(JJTHASFIELD);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/}
+{/*@bgen(jjtree) HasField */
+   try {
+/*@egen*/
+   <HAS_FIELD> Field() <FIELD_CLOSE>/*@bgen(jjtree)*/
+   } catch (Throwable jjte000) {
+     if (jjtc000) {
+       jjtree.clearNodeScope(jjtn000);
+       jjtc000 = false;
+     } else {
+       jjtree.popNode();
+     }
+     if (jjte000 instanceof RuntimeException) {
+       throw (RuntimeException)jjte000;
+     }
+     if (jjte000 instanceof ParseException) {
+       throw (ParseException)jjte000;
+     }
+     throw (Error)jjte000;
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void FieldWrapper()       : {}
+{
+   <FIELD> Field() <FIELD_CLOSE>
+}
+
+void MethodWrapper()       : {}
+{
+   <METHOD_EXPR> Method() <BEHAVIOR_CLOSE>
+}
+
+void ConstructorWrapper()       : {}
+{
+   <CONSTRUCTOR_EXPR> Constructor() <BEHAVIOR_CLOSE>
+}
+
+void Method()         :
+{/*@bgen(jjtree) Method */
+  ASTMethod jjtn000 = new ASTMethod(JJTMETHOD);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token ret, clazz, body;
+}
+{/*@bgen(jjtree) Method */
+  try {
+/*@egen*/
+  (Attribute())* (ret=<CLASS>|ret=<IDENTIFIER>|ret=<ANNOTATION>|ret=<ARRAY_CLASS>|ret=<INSTANCEOF>|ret=<TYPEDEF>) (clazz=<CLASS>|clazz=<IDENTIFIER>|clazz=<ANNOTATION>|clazz=<INSTANCEOF>|clazz=<TYPEDEF>) <SEPARATOR> (body=<IDENTIFIER>|body=<ANNOTATION>) Parameters() Throws()/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  {
+    jjtn000.setReturnTypeExpression(ret.image);
+    jjtn000.setClassExpression(clazz.image);
+    jjtn000.setMethodExpression(body.image);
+  }/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Attribute()            :
+{/*@bgen(jjtree) Attribute */
+  ASTAttribute jjtn000 = new ASTAttribute(JJTATTRIBUTE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+}
+{/*@bgen(jjtree) Attribute */
+  try {
+/*@egen*/
+  [<BEHAVIOR_NOT> { jjtn000.not=true; } ]
+  (<PUBLIC>/*@bgen(jjtree)*/
+            {
+              jjtree.closeNodeScope(jjtn000, true);
+              jjtc000 = false;
+            }
+/*@egen*/ { jjtn000.setValue(Modifier.PUBLIC); } | <PROTECTED>/*@bgen(jjtree)*/
+                                                                 {
+                                                                   jjtree.closeNodeScope(jjtn000, true);
+                                                                   jjtc000 = false;
+                                                                 }
+/*@egen*/ { jjtn000.setValue(Modifier.PROTECTED); } | <PRIVATE>/*@bgen(jjtree)*/
+                                                                                                                       {
+                                                                                                                         jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                         jjtc000 = false;
+                                                                                                                       }
+/*@egen*/ { jjtn000.setValue(Modifier.PRIVATE); } | <STATIC>/*@bgen(jjtree)*/
+                                                                                                                                                                          {
+                                                                                                                                                                            jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                            jjtc000 = false;
+                                                                                                                                                                          }
+/*@egen*/ { jjtn000.setValue(Modifier.STATIC); } | <ABSTRACT>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                              {
+                                                                                                                                                                                                                                jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                jjtc000 = false;
+                                                                                                                                                                                                                              }
+/*@egen*/ { jjtn000.setValue(Modifier.ABSTRACT); } | <FINAL>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                                                                                 {
+                                                                                                                                                                                                                                                                                   jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                                                                   jjtc000 = false;
+                                                                                                                                                                                                                                                                                 }
+/*@egen*/ { jjtn000.setValue(Modifier.FINAL); } | <NATIVE>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                                                                                                                                  {
+                                                                                                                                                                                                                                                                                                                                    jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                                                                                                                    jjtc000 = false;
+                                                                                                                                                                                                                                                                                                                                  }
+/*@egen*/ { jjtn000.setValue(Modifier.NATIVE); } | <SYNCHRONIZED>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                                                                                                                                                                                          {
+                                                                                                                                                                                                                                                                                                                                                                                            jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                                                                                                                                                                            jjtc000 = false;
+                                                                                                                                                                                                                                                                                                                                                                                          }
+/*@egen*/ { jjtn000.setValue(Modifier.SYNCHRONIZED); })/*@bgen(jjtree)*/
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Constructor()              :
+{/*@bgen(jjtree) Constructor */
+  ASTConstructor jjtn000 = new ASTConstructor(JJTCONSTRUCTOR);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token clazz, danew;
+}
+{/*@bgen(jjtree) Constructor */
+  try {
+/*@egen*/
+  (ConstructorAttribute())* (clazz=<CLASS> | clazz=<IDENTIFIER> | clazz=<ANNOTATION> | clazz=<INSTANCEOF> | clazz=<TYPEDEF>)
+  {
+    jjtn000.setClassExpression(clazz.image);
+  }
+  <SEPARATOR> (danew=<NEW> | danew=<ANNOTATION>) Parameters() Throws()/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  {
+    jjtn000.setNewExpression(danew.image);
+  }/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void ConstructorAttribute()            :
+{/*@bgen(jjtree) Attribute */
+  ASTAttribute jjtn000 = new ASTAttribute(JJTATTRIBUTE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+}
+{/*@bgen(jjtree) Attribute */
+  try {
+/*@egen*/
+  <PUBLIC>/*@bgen(jjtree)*/
+           {
+             jjtree.closeNodeScope(jjtn000, true);
+             jjtc000 = false;
+           }
+/*@egen*/ { jjtn000.setValue(Modifier.PUBLIC); } | <PROTECTED>/*@bgen(jjtree)*/
+                                                                {
+                                                                  jjtree.closeNodeScope(jjtn000, true);
+                                                                  jjtc000 = false;
+                                                                }
+/*@egen*/ { jjtn000.setValue(Modifier.PROTECTED); } | <PRIVATE>/*@bgen(jjtree)*/
+                                                                                                                      {
+                                                                                                                        jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                        jjtc000 = false;
+                                                                                                                      }
+/*@egen*/ { jjtn000.setValue(Modifier.PRIVATE); }/*@bgen(jjtree)*/
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+
+void Parameters()       :
+{
+}
+{
+   (LOOKAHEAD(3) <PARAMS_OPEN> AllParams()<PARAMS_CLOSE> | LOOKAHEAD(3) <PARAMS_OPEN> [Parameter() ( <COMMA> Parameter() )* ] <PARAMS_CLOSE>)
+}
+
+void Parameter()            :
+{/*@bgen(jjtree) Parameter */
+  ASTParameter jjtn000 = new ASTParameter(JJTPARAMETER);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token t;
+}
+{/*@bgen(jjtree) Parameter */
+  try {
+/*@egen*/
+  (t=<ALL_PARAMS> | t=<PARAM_CLASS> | t=<PARAM_IDENTIFIER> | t=<PARAM_ARRAY_CLASS> | t=<PARAM_ANNOTATION> | t=<PARAM_TYPEDEF> | t=<PARAM_INSTANCEOF>)/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  {
+    jjtn000.setTypeExpression(t.image);
+  }/*@bgen(jjtree)*/
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void AllParams()               :
+{/*@bgen(jjtree) AllParameter */
+  ASTAllParameter jjtn000 = new ASTAllParameter(JJTALLPARAMETER);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+}
+{/*@bgen(jjtree) AllParameter */
+   try {
+/*@egen*/
+   <ALL_PARAMS>/*@bgen(jjtree)*/
+   } finally {
+     if (jjtc000) {
+       jjtree.closeNodeScope(jjtn000, true);
+     }
+   }
+/*@egen*/
+}
+
+void Field()        :
+{/*@bgen(jjtree) Field */
+  ASTField jjtn000 = new ASTField(JJTFIELD);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token type, clazz, body;
+}
+{/*@bgen(jjtree) Field */
+  try {
+/*@egen*/
+  (FieldAttribute())*
+  (type=<FIELD_CLASS> | type=<FIELD_IDENTIFIER> | type=<FIELD_ANNOTATION> | type=<FIELD_ARRAY_CLASS>| type=<FIELD_INSTANCEOF> | type=<FIELD_TYPEDEF>)
+  {
+    jjtn000.setTypeExpression(type.image);
+  }
+  (clazz=<FIELD_CLASS> | clazz=<FIELD_IDENTIFIER> | clazz=<FIELD_ANNOTATION> | clazz=<FIELD_INSTANCEOF> | clazz=<FIELD_TYPEDEF>)
+  {
+    jjtn000.setClassExpr(clazz.image);
+  }
+  <FIELD_SEPARATOR>
+  (body=<FIELD_IDENTIFIER> | body=<FIELD_ANNOTATION>)/*@bgen(jjtree)*/
+  {
+    jjtree.closeNodeScope(jjtn000, true);
+    jjtc000 = false;
+  }
+/*@egen*/
+  {
+    jjtn000.setFieldExpr(body.image);
+  }/*@bgen(jjtree)*/
+  } catch (Throwable jjte000) {
+    if (jjtc000) {
+      jjtree.clearNodeScope(jjtn000);
+      jjtc000 = false;
+    } else {
+      jjtree.popNode();
+    }
+    if (jjte000 instanceof RuntimeException) {
+      throw (RuntimeException)jjte000;
+    }
+    if (jjte000 instanceof ParseException) {
+      throw (ParseException)jjte000;
+    }
+    throw (Error)jjte000;
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void FieldAttribute()            :
+{/*@bgen(jjtree) Attribute */
+  ASTAttribute jjtn000 = new ASTAttribute(JJTATTRIBUTE);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+}
+{/*@bgen(jjtree) Attribute */
+  try {
+/*@egen*/
+  [<FIELD_NOT> { jjtn000.not = true; }]
+  (<FIELD_PUBLIC>/*@bgen(jjtree)*/
+                  {
+                    jjtree.closeNodeScope(jjtn000, true);
+                    jjtc000 = false;
+                  }
+/*@egen*/ { jjtn000.setValue(Modifier.PUBLIC); } | <FIELD_PROTECTED>/*@bgen(jjtree)*/
+                                                                             {
+                                                                               jjtree.closeNodeScope(jjtn000, true);
+                                                                               jjtc000 = false;
+                                                                             }
+/*@egen*/ { jjtn000.setValue(Modifier.PROTECTED); } | <FIELD_PRIVATE>/*@bgen(jjtree)*/
+                                                                                                                                         {
+                                                                                                                                           jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                           jjtc000 = false;
+                                                                                                                                         }
+/*@egen*/ { jjtn000.setValue(Modifier.PRIVATE); } | <FIELD_STATIC>/*@bgen(jjtree)*/
+                                                                                                                                                                                                  {
+                                                                                                                                                                                                    jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                    jjtc000 = false;
+                                                                                                                                                                                                  }
+/*@egen*/ { jjtn000.setValue(Modifier.STATIC); } | <FIELD_FINAL>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                                                         {
+                                                                                                                                                                                                                                                           jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                                           jjtc000 = false;
+                                                                                                                                                                                                                                                         }
+/*@egen*/ { jjtn000.setValue(Modifier.FINAL); } | <FIELD_TRANSIENT>/*@bgen(jjtree)*/
+                                                                                                                                                                                                                                                                                                                   {
+                                                                                                                                                                                                                                                                                                                     jjtree.closeNodeScope(jjtn000, true);
+                                                                                                                                                                                                                                                                                                                     jjtc000 = false;
+                                                                                                                                                                                                                                                                                                                   }
+/*@egen*/ { jjtn000.setValue(Modifier.TRANSIENT); } )/*@bgen(jjtree)*/
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Class()        :
+{/*@bgen(jjtree) Class */
+  ASTClass jjtn000 = new ASTClass(JJTCLASS);
+  boolean jjtc000 = true;
+  jjtree.openNodeScope(jjtn000);
+/*@egen*/
+  Token clazz;
+}
+{/*@bgen(jjtree) Class */
+  try {
+/*@egen*/
+  <CLASS_EXPR>
+  (clazz=<FIELD_CLASS> | clazz=<FIELD_IDENTIFIER> | clazz=<FIELD_ANNOTATION> | clazz=<FIELD_INSTANCEOF> | clazz=<FIELD_TYPEDEF>)
+  {
+    jjtn000.setClassExpr(clazz.image);
+  }
+  <FIELD_CLOSE>/*@bgen(jjtree)*/
+  } finally {
+    if (jjtc000) {
+      jjtree.closeNodeScope(jjtn000, true);
+    }
+  }
+/*@egen*/
+}
+
+void Throws()       : {}
+{
+   (<THROWS> Exception() (<EXCEPTION_SEPERATOR> Exception())*)?
+}
+
+void Exception()           : 
+{/*@bgen(jjtree) Exception */
+   ASTException jjtn000 = new ASTException(JJTEXCEPTION);
+   boolean jjtc000 = true;
+   jjtree.openNodeScope(jjtn000);
+/*@egen*/
+   Token ex;
+}
+{/*@bgen(jjtree) Exception */
+        try {
+/*@egen*/
+	(ex=<CLASS> | ex=<IDENTIFIER>)/*@bgen(jjtree)*/
+        {
+          jjtree.closeNodeScope(jjtn000, true);
+          jjtc000 = false;
+        }
+/*@egen*/
+	{
+		jjtn000.setTypeExpression(ex.image);
+	}/*@bgen(jjtree)*/
+        } finally {
+          if (jjtc000) {
+            jjtree.closeNodeScope(jjtn000, true);
+          }
+        }
+/*@egen*/
+}
+
+
+
+
+

Added: projects/aop/branches/arrays/aop/src/resources/test/array/MANIFEST.MF
===================================================================
--- projects/aop/branches/arrays/aop/src/resources/test/array/MANIFEST.MF	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/resources/test/array/MANIFEST.MF	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1 @@
+Premain-Class: org.jboss.test.aop.array.Agent

Added: projects/aop/branches/arrays/aop/src/resources/test/array/jboss-aop.xml
===================================================================
--- projects/aop/branches/arrays/aop/src/resources/test/array/jboss-aop.xml	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/resources/test/array/jboss-aop.xml	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,3 @@
+<aop>
+   <arrayreplacement class="org.jboss.test.aop.array.AOPArrayTestCase"/>
+</aop>
\ No newline at end of file

Added: projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/AOPArrayTestCase.java
===================================================================
--- projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/AOPArrayTestCase.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/AOPArrayTestCase.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.array;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.test.aop.AOPTestWithSetup;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AOPArrayTestCase extends AOPTestWithSetup
+{
+   ClassWithArrayFields obj = new ClassWithArrayFields();
+   
+   public AOPArrayTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("AOPArrayTestCase");
+      suite.addTestSuite(AOPArrayTestCase.class);
+      return suite;
+   }
+
+   public void testIntWrite()
+   {
+      obj.ifield[1] = 100; 
+   }
+   
+   public void testIntRead()
+   {
+      obj.ifield[1] = 100;
+      int val = obj.ifield[1];
+      assertEquals(100, val);
+   }
+}

Added: projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/AOPTransformer.java
===================================================================
--- projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/AOPTransformer.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/AOPTransformer.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,314 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.test.aop.array;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.classpool.AOPClassPool;
+
+import java.lang.instrument.ClassFileTransformer;
+import java.lang.instrument.IllegalClassFormatException;
+import java.security.ProtectionDomain;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import javassist.CodeConverter;
+import javassist.CtClass;
+import javassist.CtField;
+import javassist.CtMethod;
+import javassist.CtNewMethod;
+import javassist.Modifier;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 44099 $
+ */
+public class AOPTransformer implements ClassFileTransformer
+{
+   private static HashMap<String, HashSet<String>> simpleClassFields = new HashMap<String, HashSet<String>>(); 
+//   private static HashMap<String, HashSet<String>> arrayClassFields = new HashMap<String, HashSet<String>>();
+   private static HashSet<String> arrayClasses = new HashSet<String>();
+
+   public static void addArrayClass(String clazz)
+   {
+      arrayClasses.add(clazz);
+   }
+   
+   public static void addSimpleField(String clazz, String field)
+   {
+      addField(simpleClassFields, clazz, field);
+   }
+   
+//   public static void addArrayField(String clazz, String field)
+//   {
+//      addField(arrayClassFields, clazz, field);
+//   }
+   
+   private static void addField(HashMap<String, HashSet<String>> classFields, String clazz, String field)
+   {
+      HashSet<String> fields = classFields.get(clazz); 
+      if (fields == null)
+      {
+         fields = new HashSet<String>();
+         classFields.put(clazz, fields);
+      }
+      
+      fields.add(field);
+   }
+   
+   private static boolean isAdvisableField(HashMap<String, HashSet<String>> classFields, String clazz, String field)
+   {
+      HashSet<String> fields = classFields.get(clazz);
+      if (fields == null)
+      {
+         return false;
+      }
+      
+      return fields.contains(field);
+   }
+   
+   public static boolean isAdvisableSimpleField(CtField field)
+   {
+      return isAdvisableField(simpleClassFields, field.getDeclaringClass().getName(), field.getName());
+   }
+   
+//   public static boolean isAdvisableArrayField(CtField field)
+//   {
+//      return isAdvisableField(arrayClassFields, field.getDeclaringClass().getName(), field.getName());
+//   }
+   
+   public boolean isNonAdvisableClassName(String classname)
+   {
+      return (classname.startsWith("org.jboss.aop") ||
+      classname.endsWith("$aop") ||
+      classname.startsWith("javassist") ||
+      classname.startsWith("org.jboss.util.") ||
+      classname.startsWith("gnu.trove.") ||
+      classname.startsWith("EDU.oswego.cs.dl.util.concurrent.") ||
+      // System classes
+      classname.startsWith("org.apache.crimson") ||
+      classname.startsWith("org.apache.xalan") ||
+      classname.startsWith("org.apache.xml") ||
+      classname.startsWith("org.apache.xpath") ||
+      classname.startsWith("org.ietf.") ||
+      classname.startsWith("org.omg.") ||
+      classname.startsWith("org.w3c.") ||
+      classname.startsWith("org.xml.sax.") ||
+      classname.startsWith("sunw.") ||
+      classname.startsWith("sun.") ||
+      classname.startsWith("java.") ||
+      classname.startsWith("javax.") ||
+      classname.startsWith("com.sun.")
+      );
+   }
+
+   public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException
+   {
+      className = className.replace('/', '.');
+      System.out.println("<<< loading " + className + " " + loader);
+      try
+      {
+         if (classBeingRedefined != null || isNonAdvisableClassName(className))
+         {
+            //System.out.println(" ignoring");
+            return null;
+         }
+         //System.out.println(" transforming");
+         return aspectTransform(className, loader, classBeingRedefined, protectionDomain, classfileBuffer);
+      }
+      catch(Exception e)
+      {
+         return null;
+      }
+      finally
+      {
+         //System.out.println("finished " + className + ">>>");
+      }
+   }
+
+   private byte[] aspectTransform(String className, ClassLoader loader, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer)
+   {
+      try
+      {
+         //Make sure that we use the correct classloader, in order to get the correct domain if it is a scoped loader
+         AspectManager manager = AspectManager.instance();
+         AOPClassPool pool = (AOPClassPool) manager.registerClassLoader(loader);
+         
+         CtClass clazz = pool.getLocally(className);
+         
+         createFieldWrappers(pool, clazz);
+         convertReferences(pool, clazz);
+         clazz.debugWriteFile();
+         return clazz.toBytecode();
+         
+      }
+      catch (Exception e)
+      {
+         System.err.println("Error " + e.getMessage());
+         e.printStackTrace();
+         throw new RuntimeException(e);
+      }
+   }
+   
+   private void createFieldWrappers(AOPClassPool pool, CtClass clazz) throws Exception
+   {
+      CtClass objectClass = pool.get("java.lang.Object");
+      CtField[] fields = clazz.getFields();
+      for (int i = 0 ; i < fields.length ; i++)
+      {
+         if (isAdvisableSimpleField(fields[i]))
+         {
+            CtMethod write = CtNewMethod.make(
+                  Modifier.STATIC, 
+                  CtClass.voidType, 
+                  getWriteWrapperName(fields[i]), 
+                  new CtClass[] {objectClass, fields[i].getType()}, 
+                  new CtClass[0],
+                  !Modifier.isStatic(fields[i].getModifiers()) ?
+                        "{((" + clazz.getName() + ")$1)." + fields[i].getName() + "_written = true; ((" + clazz.getName() + ")$1)." + fields[i].getName() + "= $2;}" :
+                        "{" + clazz.getName() + "." + fields[i].getName() + "_written = true; " + clazz.getName() + "." + fields[i].getName() + "= $2;}",
+                  fields[i].getDeclaringClass());
+            fields[i].getDeclaringClass().addMethod(write);
+            
+            CtMethod read = CtNewMethod.make(
+                  Modifier.STATIC, 
+                  fields[i].getType(), 
+                  getReadWrapperName(fields[i]), 
+                  new CtClass[] {objectClass}, 
+                  new CtClass[0],
+                  !Modifier.isStatic(fields[i].getModifiers()) ?
+                        "{((" + clazz.getName() + ")$1)." + fields[i].getName() + "_read = true; return ((" + clazz.getName() + ")$1)." + fields[i].getName() + ";}" :
+                        "{" + clazz.getName() + "." + fields[i].getName() + "_read = true; return " + clazz.getName() + "." + fields[i].getName() + ";}",
+                  fields[i].getDeclaringClass());
+            fields[i].getDeclaringClass().addMethod(read);
+         }
+//         if (isAdvisableArrayField(fields[i]))
+//         {
+//            //Create read method
+//            CtClass componentType = fields[i].getType();
+//            while (componentType.isArray())
+//            {
+//               componentType = componentType.getComponentType();
+//            }
+//
+//            CtClass[] readParameters = new CtClass[3];
+//            readParameters[0] = objectClass;
+//            readParameters[1] = fields[i].getType();
+//            readParameters[2] = CtClass.intType;
+//            StringBuffer readBody = new StringBuffer("{((" + clazz.getName() + ")$1)." + fields[i].getName() + "_read_index=$3; return ((" + clazz.getName() + ")$1)." + fields[i].getName() + "[$3];}");
+//            
+//            System.out.println("READ BODY-----> " + readBody);
+//            
+//            CtMethod read = CtNewMethod.make(
+//                  Modifier.STATIC, 
+//                  componentType, 
+//                  getArrayReadWrapperName(fields[i]), 
+//                  readParameters, 
+//                  new CtClass[0],
+//                  readBody.toString(),
+//                  fields[i].getDeclaringClass());
+//            fields[i].getDeclaringClass().addMethod(read);
+//            
+//            //Create write method
+//            CtClass[] writeParameters = new CtClass[4];
+//            writeParameters[0] = objectClass;
+//            writeParameters[1] = fields[i].getType();
+//            writeParameters[2] = CtClass.intType;
+//            writeParameters[3] = componentType;
+//            StringBuffer writeBody = new StringBuffer("{((" + clazz.getName() + ")$1)." + fields[i].getName() + "_write_index=$3;((" + clazz.getName() + ")$1)." + fields[i].getName() + "_write_value=$4;((" + clazz.getName() + ")$1)." + fields[i].getName() + "[$3]=$4;}");
+//            
+//            System.out.println("WRITE BODY-----> " + writeBody);
+//            CtMethod write = CtNewMethod.make(
+//                  Modifier.STATIC, 
+//                  CtClass.voidType, 
+//                  getArrayWriteWrapperName(fields[i]), 
+//                  writeParameters, 
+//                  new CtClass[0],
+//                  writeBody.toString(),
+//                  fields[i].getDeclaringClass());
+//            fields[i].getDeclaringClass().addMethod(write);
+//         }
+      }
+   }
+   
+   private void convertReferences(AOPClassPool pool, CtClass clazz) throws Exception
+   {
+      boolean replaced = false;
+      Collection refClasses = clazz.getRefClasses();
+      for (Iterator it = refClasses.iterator() ; it.hasNext() ; )
+      {
+         String name = (String)it.next();
+         if (name.equals(clazz.getName()))
+         {
+            continue;
+         }
+         CtClass refClazz = pool.get(name);
+         
+         
+         CtField[] fields = refClazz.getFields();
+         CodeConverter converter = new CodeConverter();
+         for (int i = 0 ; i < fields.length ; i++)
+         {
+            if (isAdvisableSimpleField(fields[i]))
+            {
+               replaced = true;
+               converter.replaceFieldRead(fields[i], refClazz, getReadWrapperName(fields[i]));
+               converter.replaceFieldWrite(fields[i], refClazz, getWriteWrapperName(fields[i]));
+            }
+         }
+         
+         if (arrayClasses.contains(clazz.getName()))
+         {
+            replaced = true;
+            converter.replaceArrayAccess(pool.get(ArrayAdvisor.class.getName()), "arrayRead", "arrayWrite");
+         }
+
+         if (replaced)
+         {
+            clazz.instrument(converter);
+         }
+      }
+   }
+   
+   private String getWriteWrapperName(CtField field)
+   {
+      return "aop$_w_" + field.getName(); 
+   }
+   
+   private String getReadWrapperName(CtField field)
+   {
+      return "aop$_r_" + field.getName(); 
+   }
+
+//   private String getArrayWriteWrapperName(CtField field)
+//   {
+//      return "aop$_array_w_" + field.getName(); 
+//   }
+//   
+//   private String getArrayReadWrapperName(CtField field)
+//   {
+//      return "aop$_array_r_" + field.getName(); 
+//   }
+}

Added: projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/Agent.java
===================================================================
--- projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/Agent.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/Agent.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,46 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.test.aop.array;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.standalone.StandaloneClassPoolFactory;
+
+import java.lang.instrument.Instrumentation;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 46253 $
+ */
+public class Agent
+{
+
+   public static void premain(String agentArgs, Instrumentation inst)
+   {
+      StandaloneClassPoolFactory factory = new StandaloneClassPoolFactory(); 
+      AspectManager.setClassPoolFactory(factory);
+      // necessary for configuration
+      AspectManager.instance();
+      inst.addTransformer(new AOPTransformer());
+   }
+}
\ No newline at end of file

Added: projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ArrayAdvisor.java
===================================================================
--- projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ArrayAdvisor.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ArrayAdvisor.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,157 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.array;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ArrayAdvisor
+{
+   public static Object array;
+   public static String value;
+   public static int index;
+   
+   public static void clear()
+   {
+      array = null;
+      value = null;
+      index = -1;
+   }
+   
+   private static void recordAccess(Object array, int index, String value)
+   {
+      ArrayAdvisor.array = array;
+      ArrayAdvisor.index = index;
+      ArrayAdvisor.value = value;
+   }
+   
+   //Write operations
+   public static void arrayWrite(boolean[] array, int index, boolean value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+
+   public static void arrayWrite(short[] array, int index, short value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+
+   public static void arrayWrite(int[] array, int index, int value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+   
+   public static void arrayWrite(long[] array, int index, long value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+   
+   public static void arrayWrite(float[] array, int index, float value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+   
+   public static void arrayWrite(double[] array, int index, double value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+   
+   public static void arrayWrite(char[] array, int index, char value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+   
+   public static void arrayWrite(Object[] array, int index, Object value)
+   {
+      recordAccess(array, index, String.valueOf(value));
+      array[index] = value; 
+   }
+
+   //Read operations
+   public static boolean arrayRead(boolean[] array, int index)
+   {
+      
+      boolean value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+
+   public static short arrayRead(short[] array, int index)
+   {
+      short value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+
+   public static int arrayRead(int[] array, int index)
+   {
+      int value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   public static long arrayRead(long[] array, int index)
+   {
+      long value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   public static float arrayRead(float[] array, int index)
+   {
+      float value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   public static double arrayRead(double[] array, int index)
+   {
+      double value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   public static char arrayRead(char[] array, int index)
+   {
+      char value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   public static Object arrayRead(Object[] array, int index)
+   {
+      Object value = array[index];
+      recordAccess(array, index, String.valueOf(value));
+      return value;
+   }
+   
+   
+}

Added: projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ArrayTestCase.java
===================================================================
--- projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ArrayTestCase.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ArrayTestCase.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,91 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.test.aop.array;
+
+import org.jboss.test.aop.AOPTestWithSetup;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+
+/**
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 45977 $
+ */
+public class ArrayTestCase extends AOPTestWithSetup
+{
+   Main main = new Main();
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("ArrayTestCase");
+      suite.addTestSuite(ArrayTestCase.class);
+      return suite;
+   }
+
+   public ArrayTestCase(String name)
+   {
+      super(name);
+      AOPTransformer.addSimpleField("org.jboss.test.aop.array.ClassWithSimpleFields", "field");
+      AOPTransformer.addSimpleField("org.jboss.test.aop.array.ClassWithSimpleFields", "staticfield");
+
+      AOPTransformer.addArrayClass("org.jboss.test.aop.array.ClassWithArrayFields");
+      AOPTransformer.addArrayClass("org.jboss.test.aop.array.ClassWithArrayFieldCaller");
+   }
+
+   public void testSimpleField() throws Exception
+   {
+      main.testSimpleField();
+   }
+
+   
+   public void testArrayWrite() throws Exception
+   {
+      main.testArrayWrite();
+   }
+   
+   public void testArrayRead() throws Exception
+   {
+      main.testArrayRead();
+   }
+//   
+//   public void testArrayReadWriteSelf() throws Exception
+//   {
+//      main.testArrayReadWriteSelf();
+//   }
+//
+//   public void testArrayReadWriteFromNonAdvised() throws Exception
+//   {
+//      main.testArrayReadWriteFromNonAdvised();
+//   }
+//
+//   
+//   public void testArrayField() throws Exception
+//   {
+//      main.testArrayField();
+//   }
+}

Added: projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithArrayFieldCaller.java
===================================================================
--- projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithArrayFieldCaller.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithArrayFieldCaller.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,97 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.array;
+
+import java.lang.reflect.Array;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClassWithArrayFieldCaller
+{
+   ClassWithArrayFields obj = new ClassWithArrayFields();
+   
+   public void testArrayWrite() throws Exception
+   {
+      ArrayAdvisor.clear();
+      obj.setValue(1, 100);
+      checkStatus(obj.ifield, 1, String.valueOf(100));
+      
+      ArrayAdvisor.clear();
+      obj.ifield[0] = 75;
+      checkStatus(obj.ifield, 0, String.valueOf(75));
+   }
+   
+   public void testArrayRead() throws Exception
+   {
+      obj.ifield[0] = 100;
+      obj.ifield[1] = 200;
+      
+      ArrayAdvisor.clear();
+      int val = obj.getValue(0);
+      if (val != 100) throw new RuntimeException("Wrong val " + 100);
+      checkStatus(obj.ifield, 0, String.valueOf(100));
+      
+      ArrayAdvisor.clear();
+      val = obj.ifield[1];
+      checkStatus(obj.ifield, 1, String.valueOf(200));
+   }
+
+   public void testDifferentTypes() throws Exception
+   {
+//      ArrayAdvisor.clear();
+//      obj.afield[1] = "Hello";
+//      checkStatus(obj.afield, 1, "Hello");
+//      ArrayAdvisor.clear();
+//      Object aval = obj.afield[1];
+//      if (!aval.equals("Hello")) throw new RuntimeException("Wrong val " + aval);
+//      checkStatus(obj.afield, 1, "Hello");
+//      
+//      ArrayAdvisor.clear();
+//      obj.bfield[2] = true;
+//
+//      ArrayAdvisor.clear();
+//      obj.cfield[1] = 'x';
+//      
+//      ArrayAdvisor.clear();
+//      obj.dfield[2] = 69.0d;
+//      
+//      
+//      ArrayAdvisor.clear();
+//      obj.ffield[1] = 3.9f;
+//      
+//      ArrayAdvisor.clear();
+//      obj.lfield[2] = 100L;
+//      
+      ArrayAdvisor.clear();
+      obj.sfield[1] = 5;
+   }
+  
+   private void checkStatus(Object array, int index, String value)
+   {
+      if (array != ArrayAdvisor.array) throw new RuntimeException("Wrong array " + ArrayAdvisor.array);
+      if (index != ArrayAdvisor.index) throw new RuntimeException("Wrong index " + ArrayAdvisor.index);
+      if (!value.equals(ArrayAdvisor.value)) throw new RuntimeException("Wrong string " + ArrayAdvisor.index);
+   }
+}
\ No newline at end of file

Added: projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithArrayFields.java
===================================================================
--- projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithArrayFields.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithArrayFields.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.array;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClassWithArrayFields
+{
+   
+   
+   public Object[] afield = new Object[] {"1", "2", "3"};
+   public boolean[] bfield = new boolean[] {true, false};
+   public char[] cfield = new char[] {'a', 'b', 'c'};
+   public double[] dfield = new double[] {1.5d, 1.9d};
+   public float[] ffield = new float[] {1.5f, 1.9f};
+   public int[] ifield = new int[] {0, 0, 0};
+   public long[] lfield = new long[] {0L, 0L, 0L};
+   public short[] sfield = new short[] {0, 0, 0};
+   
+   
+   public void setValue(int index, int value)
+   {
+      ifield[index] = value;
+   }
+   
+   public int getValue(int index)
+   {
+      return ifield[index];
+   }
+   
+   public void test(short s)
+   {
+      test(s);
+   }
+}

Added: projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithSimpleFieldCaller.java
===================================================================
--- projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithSimpleFieldCaller.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithSimpleFieldCaller.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,94 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.array;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClassWithSimpleFieldCaller
+{
+   ClassWithSimpleFields obj = new ClassWithSimpleFields();
+   public void testSimple() throws Exception
+   {
+      checkStatus("field", false, false);
+      obj.field = false;
+      checkStatus("field", true, false);
+      if (obj.field)
+      {
+         throw new RuntimeException("Should have been false!");
+      }
+      checkStatus("field", true, true);
+      boolean b = obj.field;
+   }
+
+   public void testSimpleNotCalled() throws Exception
+   {
+      obj.nonfield = false;
+      if (obj.nonfield)
+      {
+         throw new RuntimeException("Should have been false!");
+      }
+      boolean b = obj.nonfield;
+   }
+   
+   public void testSimpleStatic() throws Exception
+   {
+      checkStatus("staticfield", false, false);
+      ClassWithSimpleFields.staticfield = false;
+      checkStatus("staticfield", true, false);
+      if (obj.staticfield)
+      {
+         throw new RuntimeException("Should have been false!");
+      }
+      checkStatus("staticfield", true, true);
+      
+      boolean b = ClassWithSimpleFields.staticfield;
+   }
+
+   public void testSimpleStaticNotCalled() throws Exception
+   {
+      ClassWithSimpleFields.staticnonfield = false;
+      if (obj.nonfield)
+      {
+         throw new RuntimeException("Should have been false!");
+      }
+
+      boolean b = ClassWithSimpleFields.staticnonfield;
+   }
+   
+   private void checkStatus(String field, boolean written, boolean read)
+   {
+      if (field.equals("field"))
+      {
+         if (obj.field_written != written) throw new RuntimeException("Expected written " + written);
+         if (obj.field_read != read) throw new RuntimeException("Expected read " + read);
+      }
+      else if (field.equals("staticfield"))
+      {
+         if (obj.staticfield_written != written) throw new RuntimeException("Expected written " + written);
+         if (obj.staticfield_read != read) throw new RuntimeException("Expected read " + read);
+      }
+   }
+   
+}

Added: projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithSimpleFields.java
===================================================================
--- projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithSimpleFields.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/ClassWithSimpleFields.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.array;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClassWithSimpleFields
+{
+   public boolean field;
+   public boolean field_written;
+   public boolean field_read;
+   
+   public static boolean staticfield;
+   public static boolean staticfield_written;
+   public static boolean staticfield_read;
+   
+   
+   public boolean nonfield;
+   public static boolean staticnonfield;
+}

Added: projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/Main.java
===================================================================
--- projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/Main.java	2006-12-21 12:00:33 UTC (rev 59189)
+++ projects/aop/branches/arrays/aop/src/test/org/jboss/test/aop/array/Main.java	2006-12-21 12:02:00 UTC (rev 59190)
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.array;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Main
+{
+   public Main()
+   {
+   }
+
+   public static void main(String[] args)throws Exception
+   {
+      Main main = new Main();
+      main.testSimpleField();
+      main.testArrayField();
+   }
+
+   public void testSimpleField() throws Exception
+   {
+      ClassWithSimpleFieldCaller caller = new ClassWithSimpleFieldCaller();
+      caller.testSimple();
+      caller.testSimpleStatic();
+   }
+
+   
+   public void testArrayField() throws Exception
+   {
+//      ClassWithArrayFieldCaller caller = new ClassWithArrayFieldCaller();
+//      caller.testArray();
+//      caller.testArrayStatic();
+   }
+   
+   public void testArrayWrite() throws Exception
+   {
+      ClassWithArrayFieldCaller caller = new ClassWithArrayFieldCaller();
+      caller.testArrayWrite();
+   }
+   
+   public void testArrayRead() throws Exception
+   {
+      ClassWithArrayFieldCaller caller = new ClassWithArrayFieldCaller();
+      caller.testArrayRead();
+   }
+}




More information about the jboss-cvs-commits mailing list