[jboss-cvs] JBossAS SVN: r68918 - projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jan 12 08:54:00 EST 2008


Author: flavia.rainone at jboss.com
Date: 2008-01-12 08:54:00 -0500 (Sat, 12 Jan 2008)
New Revision: 68918

Modified:
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTConstructor.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTField.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTMethod.java
Log:
Added generics info to the collections of the affected classes.

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTConstructor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTConstructor.java	2008-01-12 10:34:02 UTC (rev 68917)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTConstructor.java	2008-01-12 13:54:00 UTC (rev 68918)
@@ -1,25 +1,24 @@
 /*
-  * 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.
-  */
-
+ * 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.aop.pointcut.ast;
 
 import java.util.ArrayList;
@@ -51,21 +50,22 @@
    String classExpr;
    ClassExpression clazz;
    IdentifierExpression annotation;
-   ArrayList attributes = new ArrayList();
-   ArrayList parameters = new ArrayList();
+   ArrayList<ASTAttribute> attributes = new ArrayList<ASTAttribute>();
+   ArrayList<ASTParameter> parameters = new ArrayList<ASTParameter>();
    boolean anyParameters = false;
    boolean hasAnyZeroOrMoreParameters = false;
-   ArrayList exceptions = new ArrayList();
+   ArrayList<ASTException> exceptions = new ArrayList<ASTException>();
 
    public void jjtAddChild(Node n, int i)
    {
-      if (n instanceof ASTAttribute) attributes.add(n);
-      else if (n instanceof ASTException) exceptions.add(n);
+      if (n instanceof ASTAttribute) attributes.add((ASTAttribute) n);
+      else if (n instanceof ASTException) exceptions.add((ASTException) n);
       else if (n instanceof ASTAllParameter) anyParameters = true;
       else if (n instanceof ASTParameter && !anyParameters) 
       {
-         parameters.add(0,n);
-         if (!hasAnyZeroOrMoreParameters && ((ASTParameter)n).isAnyZeroOrMoreParameters())
+         ASTParameter param = (ASTParameter) n;
+         parameters.add(0, param);
+         if (!hasAnyZeroOrMoreParameters && param.isAnyZeroOrMoreParameters())
          {
             hasAnyZeroOrMoreParameters = true;
          }
@@ -88,17 +88,17 @@
       return classExpr;
    }
 
-   public ArrayList getAttributes()
+   public ArrayList<ASTAttribute> getAttributes()
    {
       return attributes;
    }
    
-   public ArrayList getExceptions()
+   public ArrayList<ASTException> getExceptions()
    {
       return exceptions;
    }
 
-   public ArrayList getParameters()
+   public ArrayList<ASTParameter> getParameters()
    {
       return parameters;
    }

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTField.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTField.java	2008-01-12 10:34:02 UTC (rev 68917)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTField.java	2008-01-12 13:54:00 UTC (rev 68918)
@@ -54,11 +54,11 @@
    ClassExpression clazz;
    String fieldExpr;
    IdentifierExpression fieldIdentifier;
-   ArrayList attributes = new ArrayList();
+   ArrayList<ASTAttribute> attributes = new ArrayList<ASTAttribute>();
 
    public void jjtAddChild(Node n, int i)
    {
-      if (n instanceof ASTAttribute) attributes.add(n);
+      if (n instanceof ASTAttribute) attributes.add((ASTAttribute) n);
    }
 
    public void setTypeExpression(String type)
@@ -94,7 +94,7 @@
       fieldIdentifier = new IdentifierExpression(fieldExpr);
    }
 
-   public ArrayList getAttributes()
+   public ArrayList<ASTAttribute> getAttributes()
    {
       return attributes;
    }

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTMethod.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTMethod.java	2008-01-12 10:34:02 UTC (rev 68917)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTMethod.java	2008-01-12 13:54:00 UTC (rev 68918)
@@ -1,25 +1,24 @@
 /*
-  * 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.
-  */
-
+ * 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.aop.pointcut.ast;
 
 import java.util.ArrayList;
@@ -57,19 +56,20 @@
    IdentifierExpression methodIdentifier;
    boolean anyParameters = false;
    boolean hasAnyZeroOrMoreParameters = false;
-   ArrayList parameters = new ArrayList();
-   ArrayList attributes = new ArrayList();
-   ArrayList exceptions = new ArrayList();
+   ArrayList<ASTParameter> parameters = new ArrayList<ASTParameter>();
+   ArrayList<ASTAttribute> attributes = new ArrayList<ASTAttribute>();
+   ArrayList<ASTException> exceptions = new ArrayList<ASTException>();
 
    public void jjtAddChild(Node n, int i)
    {
-      if (n instanceof ASTAttribute) attributes.add(n);
-      else if (n instanceof ASTException) exceptions.add(n);
+      if (n instanceof ASTAttribute) attributes.add((ASTAttribute) n);
+      else if (n instanceof ASTException) exceptions.add((ASTException) n);
       else if (n instanceof ASTAllParameter) anyParameters = true;
       else if (n instanceof ASTParameter && !anyParameters)
       {
-         parameters.add(0, n);
-         if (!hasAnyZeroOrMoreParameters && ((ASTParameter)n).isAnyZeroOrMoreParameters())
+         ASTParameter param = (ASTParameter) n;
+         parameters.add(0, param);
+         if (!hasAnyZeroOrMoreParameters && param.isAnyZeroOrMoreParameters())
          {
             hasAnyZeroOrMoreParameters = true;
          }
@@ -119,17 +119,17 @@
       return hasAnyZeroOrMoreParameters;
    }
    
-   public ArrayList getParameters()
+   public ArrayList<ASTParameter> getParameters()
    {
       return parameters;
    }
 
-   public ArrayList getExceptions()
+   public ArrayList<ASTException> getExceptions()
    {
       return exceptions;
    }
 
-   public ArrayList getAttributes()
+   public ArrayList<ASTAttribute> getAttributes()
    {
       return attributes;
    }




More information about the jboss-cvs-commits mailing list