commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1695100 - in /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6: classfile/FieldOrMethod.java classfile/JavaClass.java generic/ClassGen.java generic/FieldGen.java generic/FieldGenOrMethodGen.java generic/MethodGen.java
Date Mon, 10 Aug 2015 14:55:00 GMT
Author: sebb
Date: Mon Aug 10 14:55:00 2015
New Revision: 1695100

URL: http://svn.apache.org/r1695100
Log:
Use ctor parameter rather than invoking setAccessFlags

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ClassGen.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/FieldGen.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/FieldGenOrMethodGen.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java?rev=1695100&r1=1695099&r2=1695100&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
Mon Aug 10 14:55:00 2015
@@ -94,7 +94,7 @@ public abstract class FieldOrMethod exte
      */
     protected FieldOrMethod(int access_flags, int name_index, int signature_index,
             Attribute[] attributes, ConstantPool constant_pool) {
-        super.setAccessFlags(access_flags);
+        super(access_flags);
         this.name_index = name_index;
         this.signature_index = signature_index;
         this.constant_pool = constant_pool;

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java?rev=1695100&r1=1695099&r2=1695100&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
Mon Aug 10 14:55:00 2015
@@ -119,6 +119,7 @@ public class JavaClass extends AccessFla
     public JavaClass(int class_name_index, int superclass_name_index, String file_name, int
major,
             int minor, int access_flags, ConstantPool constant_pool, int[] interfaces,
             Field[] fields, Method[] methods, Attribute[] attributes, byte source) {
+        super(access_flags);
         if (interfaces == null) {
             interfaces = new int[0];
         }
@@ -136,7 +137,6 @@ public class JavaClass extends AccessFla
         this.file_name = file_name;
         this.major = major;
         this.minor = minor;
-        super.setAccessFlags(access_flags);
         this.constant_pool = constant_pool;
         this.interfaces = interfaces;
         this.fields = fields;

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ClassGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ClassGen.java?rev=1695100&r1=1695099&r2=1695100&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ClassGen.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ClassGen.java
Mon Aug 10 14:55:00 2015
@@ -86,10 +86,10 @@ public class ClassGen extends AccessFlag
      */
     public ClassGen(String class_name, String super_class_name, String file_name, int access_flags,
             String[] interfaces, ConstantPoolGen cp) {
+        super(access_flags);
         this.class_name = class_name;
         this.super_class_name = super_class_name;
         this.file_name = file_name;
-        super.setAccessFlags(access_flags);
         this.cp = cp;
         // Put everything needed by default into the constant pool and the vectors
         if (file_name != null) {
@@ -126,12 +126,12 @@ public class ClassGen extends AccessFlag
      * @param clazz JavaClass object (e.g. read from file)
      */
     public ClassGen(JavaClass clazz) {
+        super(clazz.getAccessFlags());
         class_name_index = clazz.getClassNameIndex();
         superclass_name_index = clazz.getSuperclassNameIndex();
         class_name = clazz.getClassName();
         super_class_name = clazz.getSuperclassName();
         file_name = clazz.getSourceFileName();
-        super.setAccessFlags(clazz.getAccessFlags());
         cp = new ConstantPoolGen(clazz.getConstantPool());
         major = clazz.getMajor();
         minor = clazz.getMinor();

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/FieldGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/FieldGen.java?rev=1695100&r1=1695099&r2=1695100&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/FieldGen.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/FieldGen.java
Mon Aug 10 14:55:00 2015
@@ -73,7 +73,7 @@ public class FieldGen extends FieldGenOr
      * @param cp constant pool
      */
     public FieldGen(int access_flags, Type type, String name, ConstantPoolGen cp) {
-        setAccessFlags(access_flags);
+        super(access_flags);
         setType(type);
         setName(name);
         setConstantPool(cp);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/FieldGenOrMethodGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/FieldGenOrMethodGen.java?rev=1695100&r1=1695099&r2=1695100&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/FieldGenOrMethodGen.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/FieldGenOrMethodGen.java
Mon Aug 10 14:55:00 2015
@@ -45,6 +45,10 @@ public abstract class FieldGenOrMethodGe
     }
 
 
+    public FieldGenOrMethodGen(int access_flags) {
+        super(access_flags);
+    }
+
     public void setType( Type type ) {
         if (type.getType() == Constants.T_ADDRESS) {
             throw new IllegalArgumentException("Type can not be " + type);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java?rev=1695100&r1=1695099&r2=1695100&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java
Mon Aug 10 14:55:00 2015
@@ -120,7 +120,7 @@ public class MethodGen extends FieldGenO
      */
     public MethodGen(int access_flags, Type return_type, Type[] arg_types, String[] arg_names,
             String method_name, String class_name, InstructionList il, ConstantPoolGen cp)
{
-        setAccessFlags(access_flags);
+        super(access_flags);
         setType(return_type);
         setArgumentTypes(arg_types);
         setArgumentNames(arg_names);



Mime
View raw message