[jboss-cvs] JBossAS SVN: r70756 - in projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut: ast and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 11 22:33:18 EDT 2008
Author: flavia.rainone at jboss.com
Date: 2008-03-11 22:33:18 -0400 (Tue, 11 Mar 2008)
New Revision: 70756
Added:
projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTBehavior.java
Removed:
projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTBehaviour.java
Modified:
projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/Util.java
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/ASTMethod.java
Log:
[JBAOP-502] More refactoring.
Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/Util.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/Util.java 2008-03-12 02:30:36 UTC (rev 70755)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/Util.java 2008-03-12 02:33:18 UTC (rev 70756)
@@ -45,7 +45,7 @@
import org.jboss.aop.annotation.PortableAnnotationElement;
import org.jboss.aop.introduction.InterfaceIntroduction;
import org.jboss.aop.pointcut.ast.ASTAttribute;
-import org.jboss.aop.pointcut.ast.ASTBehaviour;
+import org.jboss.aop.pointcut.ast.ASTBehavior;
import org.jboss.aop.pointcut.ast.ASTConstructor;
import org.jboss.aop.pointcut.ast.ASTException;
import org.jboss.aop.pointcut.ast.ASTField;
@@ -678,7 +678,7 @@
return true;
}
- public static boolean matchesParameters(Advisor advisor, ASTBehaviour node, CtBehavior ctBehavior)
+ public static boolean matchesParameters(Advisor advisor, ASTBehavior node, CtBehavior ctBehavior)
{
if (node.isAnyParameters()) return true;
try
Copied: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTBehavior.java (from rev 70750, projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTBehaviour.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTBehavior.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTBehavior.java 2008-03-12 02:33:18 UTC (rev 70756)
@@ -0,0 +1,122 @@
+/*
+ * 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;
+
+/**
+ * Represents a method or constructor node in the AST tree.
+ *
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class ASTBehavior extends SimpleNode
+{
+ String classExpr;
+ ClassExpression clazz;
+ boolean anyParameters = false;
+ boolean hasAnyZeroOrMoreParameters = false;
+
+ ArrayList<ASTParameter> parameters = new ArrayList<ASTParameter>();
+ ArrayList<ASTAttribute> attributes = new ArrayList<ASTAttribute>();
+ ArrayList<ASTException> exceptions = new ArrayList<ASTException>();
+
+ public ASTBehavior(int id)
+ {
+ super(id);
+ }
+
+ public ASTBehavior(PointcutExpressionParser p, int id)
+ {
+ super(p, id);
+ }
+
+ public void jjtAddChild(Node n, int i)
+ {
+ 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)
+ {
+ ASTParameter param = (ASTParameter) n;
+ parameters.add(0, param);
+ if (!hasAnyZeroOrMoreParameters && param.isAnyZeroOrMoreParameters())
+ {
+ hasAnyZeroOrMoreParameters = true;
+ }
+ }
+ else super.jjtAddChild(n, i);
+ }
+
+ /** Accept the visitor. **/
+ public Object jjtAccept(PointcutExpressionParserVisitor visitor, Object data)
+ {
+ return visitor.visit(this, data);
+ }
+ /** Accept the visitor. **/
+ public Object jjtAccept(TypeExpressionParserVisitor visitor, Object data)
+ {
+ return visitor.visit(this, data);
+ }
+
+
+ public void setClassExpression(String exp)
+ {
+ classExpr = exp;
+ clazz = new ClassExpression(exp);
+ }
+
+ public String getClassExpr()
+ {
+ return classExpr;
+ }
+
+ public ArrayList<ASTAttribute> getAttributes()
+ {
+ return attributes;
+ }
+
+ public ArrayList<ASTException> getExceptions()
+ {
+ return exceptions;
+ }
+
+ public ArrayList<ASTParameter> getParameters()
+ {
+ return parameters;
+ }
+
+
+ public boolean isAnyParameters()
+ {
+ return anyParameters;
+ }
+
+ public boolean hasAnyZeroOrMoreParameters()
+ {
+ return hasAnyZeroOrMoreParameters;
+ }
+
+ public ClassExpression getClazz()
+ {
+ return clazz;
+ }
+}
\ No newline at end of file
Deleted: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTBehaviour.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTBehaviour.java 2008-03-12 02:30:36 UTC (rev 70755)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTBehaviour.java 2008-03-12 02:33:18 UTC (rev 70756)
@@ -1,122 +0,0 @@
-/*
- * 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;
-
-/**
- * Represents a method or constructor node in the AST tree.
- *
- * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
- */
-public class ASTBehaviour extends SimpleNode
-{
- String classExpr;
- ClassExpression clazz;
- boolean anyParameters = false;
- boolean hasAnyZeroOrMoreParameters = false;
-
- ArrayList<ASTParameter> parameters = new ArrayList<ASTParameter>();
- ArrayList<ASTAttribute> attributes = new ArrayList<ASTAttribute>();
- ArrayList<ASTException> exceptions = new ArrayList<ASTException>();
-
- public ASTBehaviour(int id)
- {
- super(id);
- }
-
- public ASTBehaviour(PointcutExpressionParser p, int id)
- {
- super(p, id);
- }
-
- public void jjtAddChild(Node n, int i)
- {
- 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)
- {
- ASTParameter param = (ASTParameter) n;
- parameters.add(0, param);
- if (!hasAnyZeroOrMoreParameters && param.isAnyZeroOrMoreParameters())
- {
- hasAnyZeroOrMoreParameters = true;
- }
- }
- else super.jjtAddChild(n, i);
- }
-
- /** Accept the visitor. **/
- public Object jjtAccept(PointcutExpressionParserVisitor visitor, Object data)
- {
- return visitor.visit(this, data);
- }
- /** Accept the visitor. **/
- public Object jjtAccept(TypeExpressionParserVisitor visitor, Object data)
- {
- return visitor.visit(this, data);
- }
-
-
- public void setClassExpression(String exp)
- {
- classExpr = exp;
- clazz = new ClassExpression(exp);
- }
-
- public String getClassExpr()
- {
- return classExpr;
- }
-
- public ArrayList<ASTAttribute> getAttributes()
- {
- return attributes;
- }
-
- public ArrayList<ASTException> getExceptions()
- {
- return exceptions;
- }
-
- public ArrayList<ASTParameter> getParameters()
- {
- return parameters;
- }
-
-
- public boolean isAnyParameters()
- {
- return anyParameters;
- }
-
- public boolean hasAnyZeroOrMoreParameters()
- {
- return hasAnyZeroOrMoreParameters;
- }
-
- public ClassExpression getClazz()
- {
- return clazz;
- }
-}
\ No newline at end of file
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-03-12 02:30:36 UTC (rev 70755)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTConstructor.java 2008-03-12 02:33:18 UTC (rev 70756)
@@ -22,7 +22,7 @@
package org.jboss.aop.pointcut.ast;
-public class ASTConstructor extends ASTBehaviour
+public class ASTConstructor extends ASTBehavior
{
public ASTConstructor(int id)
{
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-03-12 02:30:36 UTC (rev 70755)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTMethod.java 2008-03-12 02:33:18 UTC (rev 70756)
@@ -22,7 +22,7 @@
package org.jboss.aop.pointcut.ast;
-public class ASTMethod extends ASTBehaviour
+public class ASTMethod extends ASTBehavior
{
public ASTMethod(int id)
{
More information about the jboss-cvs-commits
mailing list