aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMark Thomas <markt@apache.org>2017-02-13 20:19:41 +0000
committerMark Thomas <markt@apache.org>2017-02-13 20:19:41 +0000
commit5f5fa24f351870d57a196a2280ae7a0b668f26c7 (patch)
treed2ca3f0af5b8635029534f92819bc946e2a3a354 /src/test
parent28d51dace3fbbf8f0bd71f749e5290685b0c5df2 (diff)
downloadapache-commons-bcel-5f5fa24f351870d57a196a2280ae7a0b668f26c7.tar.gz
First pass at Java 9 support based on EA releases and http://cr.openjdk.java.net/~mr/jigsaw/spec/lang-vm.html#jigsaw-2.6
The motivation is primarily to provide the minimum required by Tomcat to parse Java 9 class files. I have assumed (early access) Java 9 support will make the next release 6.1 git-svn-id: https://svn.apache.org/repos/asf/commons/proper/bcel/trunk@1782852 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/apache/bcel/visitors/CounterVisitor.java26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/test/java/org/apache/bcel/visitors/CounterVisitor.java b/src/test/java/org/apache/bcel/visitors/CounterVisitor.java
index 8e743823..112f19b9 100644
--- a/src/test/java/org/apache/bcel/visitors/CounterVisitor.java
+++ b/src/test/java/org/apache/bcel/visitors/CounterVisitor.java
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.bcel.visitors;
@@ -35,7 +35,9 @@ import org.apache.bcel.classfile.ConstantLong;
import org.apache.bcel.classfile.ConstantMethodHandle;
import org.apache.bcel.classfile.ConstantMethodType;
import org.apache.bcel.classfile.ConstantMethodref;
+import org.apache.bcel.classfile.ConstantModule;
import org.apache.bcel.classfile.ConstantNameAndType;
+import org.apache.bcel.classfile.ConstantPackage;
import org.apache.bcel.classfile.ConstantPool;
import org.apache.bcel.classfile.ConstantString;
import org.apache.bcel.classfile.ConstantUtf8;
@@ -151,6 +153,12 @@ public class CounterVisitor implements Visitor
/** @since 6.0 */
public int constantInvokeDynamic = 0;
+
+ /** @since 6.1 */
+ public int constantModuleCount = 0;
+
+ /** @since 6.1 */
+ public int constantPackageCount = 0;
// CHECKSTYLE:ON
@@ -406,7 +414,7 @@ public class CounterVisitor implements Visitor
/** @since 6.0 */
@Override
public void visitConstantMethodType(final ConstantMethodType obj) {
- // TODO Auto-generated method stub
+ // TODO Auto-generated method stub
}
/** @since 6.0 */
@@ -418,6 +426,18 @@ public class CounterVisitor implements Visitor
/** @since 6.0 */
@Override
public void visitParameterAnnotationEntry(final ParameterAnnotationEntry parameterAnnotationEntry) {
- // TODO Auto-generated method stub
+ // TODO Auto-generated method stub
+ }
+
+ /** @since 6.1 */
+ @Override
+ public void visitConstantPackage(ConstantPackage constantPackage) {
+ constantPackageCount++;
+ }
+
+ /** @since 6.1 */
+ @Override
+ public void visitConstantModule(ConstantModule constantModule) {
+ constantModuleCount++;
}
}