You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2018/11/29 00:34:05 UTC
[18/46] tapestry-5 git commit: TAP5-2588: upgrading from ASM 6 to 7
for Java 9+ support
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleOpenNode.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleOpenNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleOpenNode.java
old mode 100644
new mode 100755
index 957340d..46585aa
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleOpenNode.java
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleOpenNode.java
@@ -1,82 +1,79 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2011 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
package org.apache.tapestry5.internal.plastic.asm.tree;
import java.util.List;
-
import org.apache.tapestry5.internal.plastic.asm.ModuleVisitor;
/**
- * A node that represents an opened package with its name and the module that can access to it.
- *
+ * A node that represents an opened package with its name and the module that can access it.
+ *
* @author Remi Forax
*/
public class ModuleOpenNode {
- /**
- * The package name.
- */
- public String packaze;
-
- /**
- * The access flags (see {@link org.objectweb.asm.Opcodes}).
- * Valid values are {@code ACC_SYNTHETIC} and {@code ACC_MANDATED}.
- */
- public int access;
- /**
- * A list of modules that can access to this exported package.
- * May be <tt>null</tt>.
- */
- public List<String> modules;
+ /** The internal name of the opened package. */
+ public String packaze;
+
+ /**
+ * The access flag of the opened package, valid values are among {@code ACC_SYNTHETIC} and {@code
+ * ACC_MANDATED}.
+ */
+ public int access;
+
+ /**
+ * The fully qualified names (using dots) of the modules that can use deep reflection to the
+ * classes of the open package, or {@literal null}.
+ */
+ public List<String> modules;
- /**
- * Constructs a new {@link ModuleOpenNode}.
- *
- * @param packaze
- * the parameter's name.
- * @param modules
- * a list of modules that can access to this open package.
- */
- public ModuleOpenNode(final String packaze, final int access, final List<String> modules) {
- this.packaze = packaze;
- this.access = access;
- this.modules = modules;
- }
+ /**
+ * Constructs a new {@link ModuleOpenNode}.
+ *
+ * @param packaze the internal name of the opened package.
+ * @param access the access flag of the opened package, valid values are among {@code
+ * ACC_SYNTHETIC} and {@code ACC_MANDATED}.
+ * @param modules the fully qualified names (using dots) of the modules that can use deep
+ * reflection to the classes of the open package, or {@literal null}.
+ */
+ public ModuleOpenNode(final String packaze, final int access, final List<String> modules) {
+ this.packaze = packaze;
+ this.access = access;
+ this.modules = modules;
+ }
- /**
- * Makes the given module visitor visit this open declaration.
- *
- * @param mv
- * a module visitor.
- */
- public void accept(final ModuleVisitor mv) {
- mv.visitExport(packaze, access, (modules == null) ? null : modules.toArray(new String[0]));
- }
+ /**
+ * Makes the given module visitor visit this opened package.
+ *
+ * @param moduleVisitor a module visitor.
+ */
+ public void accept(final ModuleVisitor moduleVisitor) {
+ moduleVisitor.visitOpen(
+ packaze, access, modules == null ? null : modules.toArray(new String[0]));
+ }
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleProvideNode.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleProvideNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleProvideNode.java
old mode 100644
new mode 100755
index 4225f56..33ce668
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleProvideNode.java
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleProvideNode.java
@@ -1,74 +1,66 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2011 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
package org.apache.tapestry5.internal.plastic.asm.tree;
import java.util.List;
-
import org.apache.tapestry5.internal.plastic.asm.ModuleVisitor;
/**
* A node that represents a service and its implementation provided by the current module.
- *
+ *
* @author Remi Forax
*/
public class ModuleProvideNode {
- /**
- * The service name (in its internal form).
- */
- public String service;
- /**
- * The service provider names (in their internal form).
- */
- public List<String> providers;
+ /** The internal name of the service. */
+ public String service;
+
+ /** The internal names of the implementations of the service (there is at least one provider). */
+ public List<String> providers;
- /**
- * Constructs a new {@link ModuleProvideNode}.
- *
- * @param service
- * the service name (in its internal form).
- * @param providers
- * the service provider names (in their internal form).
- */
- public ModuleProvideNode(final String service, final List<String> providers) {
- this.service = service;
- this.providers = providers;
- }
+ /**
+ * Constructs a new {@link ModuleProvideNode}.
+ *
+ * @param service the internal name of the service.
+ * @param providers the internal names of the implementations of the service (there is at least
+ * one provider).
+ */
+ public ModuleProvideNode(final String service, final List<String> providers) {
+ this.service = service;
+ this.providers = providers;
+ }
- /**
- * Makes the given module visitor visit this require declaration.
- *
- * @param mv
- * a module visitor.
- */
- public void accept(final ModuleVisitor mv) {
- mv.visitProvide(service, providers.toArray(new String[0]));
- }
+ /**
+ * Makes the given module visitor visit this require declaration.
+ *
+ * @param moduleVisitor a module visitor.
+ */
+ public void accept(final ModuleVisitor moduleVisitor) {
+ moduleVisitor.visitProvide(service, providers.toArray(new String[0]));
+ }
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleRequireNode.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleRequireNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleRequireNode.java
old mode 100644
new mode 100755
index 83e8897..6d94c0c
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleRequireNode.java
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ModuleRequireNode.java
@@ -1,87 +1,73 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2011 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
package org.apache.tapestry5.internal.plastic.asm.tree;
import org.apache.tapestry5.internal.plastic.asm.ModuleVisitor;
/**
* A node that represents a required module with its name and access of a module descriptor.
- *
+ *
* @author Remi Forax
*/
public class ModuleRequireNode {
- /**
- * The name of the required module.
- */
- public String module;
- /**
- * The access flags (see {@link org.objectweb.asm.Opcodes}).
- * Valid values are <tt>ACC_TRANSITIVE</tt>, <tt>ACC_STATIC_PHASE</tt>,
- * <tt>ACC_SYNTHETIC</tt> and <tt>ACC_MANDATED</tt>.
- */
- public int access;
-
- /**
- * Version at compile time of the required module or null.
- */
- public String version;
+ /** The fully qualified name (using dots) of the dependence. */
+ public String module;
+
+ /**
+ * The access flag of the dependence among {@code ACC_TRANSITIVE}, {@code ACC_STATIC_PHASE},
+ * {@code ACC_SYNTHETIC} and {@code ACC_MANDATED}.
+ */
+ public int access;
+
+ /** The module version at compile time, or {@literal null}. */
+ public String version;
- /**
- * Constructs a new {@link ModuleRequireNode}.
- *
- * @param module
- * the name of the required module.
- * @param access
- * The access flags. Valid values are
- * <tt>ACC_TRANSITIVE</tt>, <tt>ACC_STATIC_PHASE</tt>,
- * <tt>ACC_SYNTHETIC</tt> and <tt>ACC_MANDATED</tt>
- * (see {@link org.objectweb.asm.Opcodes}).
- * @param version
- * Version of the required module at compile time,
- * null if not defined.
- */
- public ModuleRequireNode(final String module, final int access,
- final String version) {
- this.module = module;
- this.access = access;
- this.version = version;
- }
+ /**
+ * Constructs a new {@link ModuleRequireNode}.
+ *
+ * @param module the fully qualified name (using dots) of the dependence.
+ * @param access the access flag of the dependence among {@code ACC_TRANSITIVE}, {@code
+ * ACC_STATIC_PHASE}, {@code ACC_SYNTHETIC} and {@code ACC_MANDATED}.
+ * @param version the module version at compile time, or {@literal null}.
+ */
+ public ModuleRequireNode(final String module, final int access, final String version) {
+ this.module = module;
+ this.access = access;
+ this.version = version;
+ }
- /**
- * Makes the given module visitor visit this require directive.
- *
- * @param mv
- * a module visitor.
- */
- public void accept(final ModuleVisitor mv) {
- mv.visitRequire(module, access, version);
- }
+ /**
+ * Makes the given module visitor visit this require directive.
+ *
+ * @param moduleVisitor a module visitor.
+ */
+ public void accept(final ModuleVisitor moduleVisitor) {
+ moduleVisitor.visitRequire(module, access, version);
+ }
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/MultiANewArrayInsnNode.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/MultiANewArrayInsnNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/MultiANewArrayInsnNode.java
old mode 100644
new mode 100755
index 065ad59..6cb8d8c
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/MultiANewArrayInsnNode.java
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/MultiANewArrayInsnNode.java
@@ -1,84 +1,74 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2011 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
package org.apache.tapestry5.internal.plastic.asm.tree;
import java.util.Map;
-
import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
import org.apache.tapestry5.internal.plastic.asm.Opcodes;
/**
* A node that represents a MULTIANEWARRAY instruction.
- *
+ *
* @author Eric Bruneton
*/
public class MultiANewArrayInsnNode extends AbstractInsnNode {
- /**
- * An array type descriptor (see {@link org.objectweb.asm.Type}).
- */
- public String desc;
-
- /**
- * Number of dimensions of the array to allocate.
- */
- public int dims;
+ /** An array type descriptor (see {@link org.apache.tapestry5.internal.plastic.asm.Type}). */
+ public String desc;
- /**
- * Constructs a new {@link MultiANewArrayInsnNode}.
- *
- * @param desc
- * an array type descriptor (see {@link org.objectweb.asm.Type}).
- * @param dims
- * number of dimensions of the array to allocate.
- */
- public MultiANewArrayInsnNode(final String desc, final int dims) {
- super(Opcodes.MULTIANEWARRAY);
- this.desc = desc;
- this.dims = dims;
- }
+ /** Number of dimensions of the array to allocate. */
+ public int dims;
- @Override
- public int getType() {
- return MULTIANEWARRAY_INSN;
- }
+ /**
+ * Constructs a new {@link MultiANewArrayInsnNode}.
+ *
+ * @param descriptor an array type descriptor (see {@link org.apache.tapestry5.internal.plastic.asm.Type}).
+ * @param numDimensions the number of dimensions of the array to allocate.
+ */
+ public MultiANewArrayInsnNode(final String descriptor, final int numDimensions) {
+ super(Opcodes.MULTIANEWARRAY);
+ this.desc = descriptor;
+ this.dims = numDimensions;
+ }
- @Override
- public void accept(final MethodVisitor mv) {
- mv.visitMultiANewArrayInsn(desc, dims);
- acceptAnnotations(mv);
- }
+ @Override
+ public int getType() {
+ return MULTIANEWARRAY_INSN;
+ }
- @Override
- public AbstractInsnNode clone(final Map<LabelNode, LabelNode> labels) {
- return new MultiANewArrayInsnNode(desc, dims).cloneAnnotations(this);
- }
+ @Override
+ public void accept(final MethodVisitor methodVisitor) {
+ methodVisitor.visitMultiANewArrayInsn(desc, dims);
+ acceptAnnotations(methodVisitor);
+ }
-}
\ No newline at end of file
+ @Override
+ public AbstractInsnNode clone(final Map<LabelNode, LabelNode> clonedLabels) {
+ return new MultiANewArrayInsnNode(desc, dims).cloneAnnotations(this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ParameterNode.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ParameterNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ParameterNode.java
old mode 100644
new mode 100755
index 001ddb9..2c584ad
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ParameterNode.java
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ParameterNode.java
@@ -1,76 +1,68 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2011 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
package org.apache.tapestry5.internal.plastic.asm.tree;
import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
/**
- * A node that represents a parameter access and name.
- *
+ * A node that represents a parameter of a method.
+ *
* @author Remi Forax
*/
public class ParameterNode {
- /**
- * The parameter's name.
- */
- public String name;
- /**
- * The parameter's access flags (see {@link org.objectweb.asm.Opcodes}).
- * Valid values are <tt>ACC_FINAL</tt>, <tt>ACC_SYNTHETIC</tt> and
- * <tt>ACC_MANDATED</tt>.
- */
- public int access;
+ /** The parameter's name. */
+ public String name;
+
+ /**
+ * The parameter's access flags (see {@link org.apache.tapestry5.internal.plastic.asm.Opcodes}). Valid values are {@code
+ * ACC_FINAL}, {@code ACC_SYNTHETIC} and {@code ACC_MANDATED}.
+ */
+ public int access;
- /**
- * Constructs a new {@link ParameterNode}.
- *
- * @param access
- * The parameter's access flags. Valid values are
- * <tt>ACC_FINAL</tt>, <tt>ACC_SYNTHETIC</tt> or/and
- * <tt>ACC_MANDATED</tt> (see {@link org.objectweb.asm.Opcodes}).
- * @param name
- * the parameter's name.
- */
- public ParameterNode(final String name, final int access) {
- this.name = name;
- this.access = access;
- }
+ /**
+ * Constructs a new {@link ParameterNode}.
+ *
+ * @param access The parameter's access flags. Valid values are {@code ACC_FINAL}, {@code
+ * ACC_SYNTHETIC} or/and {@code ACC_MANDATED} (see {@link org.apache.tapestry5.internal.plastic.asm.Opcodes}).
+ * @param name the parameter's name.
+ */
+ public ParameterNode(final String name, final int access) {
+ this.name = name;
+ this.access = access;
+ }
- /**
- * Makes the given visitor visit this parameter declaration.
- *
- * @param mv
- * a method visitor.
- */
- public void accept(final MethodVisitor mv) {
- mv.visitParameter(name, access);
- }
+ /**
+ * Makes the given visitor visit this parameter declaration.
+ *
+ * @param methodVisitor a method visitor.
+ */
+ public void accept(final MethodVisitor methodVisitor) {
+ methodVisitor.visitParameter(name, access);
+ }
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TableSwitchInsnNode.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TableSwitchInsnNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TableSwitchInsnNode.java
old mode 100644
new mode 100755
index e9ef6f2..12e7e68
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TableSwitchInsnNode.java
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TableSwitchInsnNode.java
@@ -1,114 +1,93 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2011 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
package org.apache.tapestry5.internal.plastic.asm.tree;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
-
import org.apache.tapestry5.internal.plastic.asm.Label;
import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
import org.apache.tapestry5.internal.plastic.asm.Opcodes;
/**
* A node that represents a TABLESWITCH instruction.
- *
+ *
* @author Eric Bruneton
*/
public class TableSwitchInsnNode extends AbstractInsnNode {
- /**
- * The minimum key value.
- */
- public int min;
+ /** The minimum key value. */
+ public int min;
- /**
- * The maximum key value.
- */
- public int max;
+ /** The maximum key value. */
+ public int max;
- /**
- * Beginning of the default handler block.
- */
- public LabelNode dflt;
+ /** Beginning of the default handler block. */
+ public LabelNode dflt;
- /**
- * Beginnings of the handler blocks. This list is a list of
- * {@link LabelNode} objects.
- */
- public List<LabelNode> labels;
+ /** Beginnings of the handler blocks. This list is a list of {@link LabelNode} objects. */
+ public List<LabelNode> labels;
- /**
- * Constructs a new {@link TableSwitchInsnNode}.
- *
- * @param min
- * the minimum key value.
- * @param max
- * the maximum key value.
- * @param dflt
- * beginning of the default handler block.
- * @param labels
- * beginnings of the handler blocks. <tt>labels[i]</tt> is the
- * beginning of the handler block for the <tt>min + i</tt> key.
- */
- public TableSwitchInsnNode(final int min, final int max,
- final LabelNode dflt, final LabelNode... labels) {
- super(Opcodes.TABLESWITCH);
- this.min = min;
- this.max = max;
- this.dflt = dflt;
- this.labels = new ArrayList<LabelNode>();
- if (labels != null) {
- this.labels.addAll(Arrays.asList(labels));
- }
- }
+ /**
+ * Constructs a new {@link TableSwitchInsnNode}.
+ *
+ * @param min the minimum key value.
+ * @param max the maximum key value.
+ * @param dflt beginning of the default handler block.
+ * @param labels beginnings of the handler blocks. {@code labels[i]} is the beginning of the
+ * handler block for the {@code min + i} key.
+ */
+ public TableSwitchInsnNode(
+ final int min, final int max, final LabelNode dflt, final LabelNode... labels) {
+ super(Opcodes.TABLESWITCH);
+ this.min = min;
+ this.max = max;
+ this.dflt = dflt;
+ this.labels = Util.asArrayList(labels);
+ }
- @Override
- public int getType() {
- return TABLESWITCH_INSN;
- }
+ @Override
+ public int getType() {
+ return TABLESWITCH_INSN;
+ }
- @Override
- public void accept(final MethodVisitor mv) {
- Label[] labels = new Label[this.labels.size()];
- for (int i = 0; i < labels.length; ++i) {
- labels[i] = this.labels.get(i).getLabel();
- }
- mv.visitTableSwitchInsn(min, max, dflt.getLabel(), labels);
- acceptAnnotations(mv);
+ @Override
+ public void accept(final MethodVisitor methodVisitor) {
+ Label[] labelsArray = new Label[this.labels.size()];
+ for (int i = 0, n = labelsArray.length; i < n; ++i) {
+ labelsArray[i] = this.labels.get(i).getLabel();
}
+ methodVisitor.visitTableSwitchInsn(min, max, dflt.getLabel(), labelsArray);
+ acceptAnnotations(methodVisitor);
+ }
- @Override
- public AbstractInsnNode clone(final Map<LabelNode, LabelNode> labels) {
- return new TableSwitchInsnNode(min, max, clone(dflt, labels), clone(
- this.labels, labels)).cloneAnnotations(this);
- }
-}
\ No newline at end of file
+ @Override
+ public AbstractInsnNode clone(final Map<LabelNode, LabelNode> clonedLabels) {
+ return new TableSwitchInsnNode(min, max, clone(dflt, clonedLabels), clone(labels, clonedLabels))
+ .cloneAnnotations(this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TryCatchBlockNode.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TryCatchBlockNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TryCatchBlockNode.java
old mode 100644
new mode 100755
index a4c8dde..aa98364
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TryCatchBlockNode.java
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TryCatchBlockNode.java
@@ -1,153 +1,126 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2011 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
package org.apache.tapestry5.internal.plastic.asm.tree;
import java.util.List;
-
import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
/**
* A node that represents a try catch block.
- *
+ *
* @author Eric Bruneton
*/
public class TryCatchBlockNode {
- /**
- * Beginning of the exception handler's scope (inclusive).
- */
- public LabelNode start;
+ /** The beginning of the exception handler's scope (inclusive). */
+ public LabelNode start;
- /**
- * End of the exception handler's scope (exclusive).
- */
- public LabelNode end;
+ /** The end of the exception handler's scope (exclusive). */
+ public LabelNode end;
- /**
- * Beginning of the exception handler's code.
- */
- public LabelNode handler;
+ /** The beginning of the exception handler's code. */
+ public LabelNode handler;
- /**
- * Internal name of the type of exceptions handled by the handler. May be
- * <tt>null</tt> to catch any exceptions (for "finally" blocks).
- */
- public String type;
+ /**
+ * The internal name of the type of exceptions handled by the handler. May be {@literal null} to
+ * catch any exceptions (for "finally" blocks).
+ */
+ public String type;
- /**
- * The runtime visible type annotations on the exception handler type. This
- * list is a list of {@link TypeAnnotationNode} objects. May be
- * <tt>null</tt>.
- *
- * @associates org.objectweb.asm.tree.TypeAnnotationNode
- * @label visible
- */
- public List<TypeAnnotationNode> visibleTypeAnnotations;
+ /** The runtime visible type annotations on the exception handler type. May be {@literal null}. */
+ public List<TypeAnnotationNode> visibleTypeAnnotations;
- /**
- * The runtime invisible type annotations on the exception handler type.
- * This list is a list of {@link TypeAnnotationNode} objects. May be
- * <tt>null</tt>.
- *
- * @associates org.objectweb.asm.tree.TypeAnnotationNode
- * @label invisible
- */
- public List<TypeAnnotationNode> invisibleTypeAnnotations;
+ /**
+ * The runtime invisible type annotations on the exception handler type. May be {@literal null}.
+ */
+ public List<TypeAnnotationNode> invisibleTypeAnnotations;
- /**
- * Constructs a new {@link TryCatchBlockNode}.
- *
- * @param start
- * beginning of the exception handler's scope (inclusive).
- * @param end
- * end of the exception handler's scope (exclusive).
- * @param handler
- * beginning of the exception handler's code.
- * @param type
- * internal name of the type of exceptions handled by the
- * handler, or <tt>null</tt> to catch any exceptions (for
- * "finally" blocks).
- */
- public TryCatchBlockNode(final LabelNode start, final LabelNode end,
- final LabelNode handler, final String type) {
- this.start = start;
- this.end = end;
- this.handler = handler;
- this.type = type;
- }
+ /**
+ * Constructs a new {@link TryCatchBlockNode}.
+ *
+ * @param start the beginning of the exception handler's scope (inclusive).
+ * @param end the end of the exception handler's scope (exclusive).
+ * @param handler the beginning of the exception handler's code.
+ * @param type the internal name of the type of exceptions handled by the handler, or {@literal
+ * null} to catch any exceptions (for "finally" blocks).
+ */
+ public TryCatchBlockNode(
+ final LabelNode start, final LabelNode end, final LabelNode handler, final String type) {
+ this.start = start;
+ this.end = end;
+ this.handler = handler;
+ this.type = type;
+ }
- /**
- * Updates the index of this try catch block in the method's list of try
- * catch block nodes. This index maybe stored in the 'target' field of the
- * type annotations of this block.
- *
- * @param index
- * the new index of this try catch block in the method's list of
- * try catch block nodes.
- */
- public void updateIndex(final int index) {
- int newTypeRef = 0x42000000 | (index << 8);
- if (visibleTypeAnnotations != null) {
- for (TypeAnnotationNode tan : visibleTypeAnnotations) {
- tan.typeRef = newTypeRef;
- }
- }
- if (invisibleTypeAnnotations != null) {
- for (TypeAnnotationNode tan : invisibleTypeAnnotations) {
- tan.typeRef = newTypeRef;
- }
- }
+ /**
+ * Updates the index of this try catch block in the method's list of try catch block nodes. This
+ * index maybe stored in the 'target' field of the type annotations of this block.
+ *
+ * @param index the new index of this try catch block in the method's list of try catch block
+ * nodes.
+ */
+ public void updateIndex(final int index) {
+ int newTypeRef = 0x42000000 | (index << 8);
+ if (visibleTypeAnnotations != null) {
+ for (int i = 0, n = visibleTypeAnnotations.size(); i < n; ++i) {
+ visibleTypeAnnotations.get(i).typeRef = newTypeRef;
+ }
}
+ if (invisibleTypeAnnotations != null) {
+ for (int i = 0, n = invisibleTypeAnnotations.size(); i < n; ++i) {
+ invisibleTypeAnnotations.get(i).typeRef = newTypeRef;
+ }
+ }
+ }
- /**
- * Makes the given visitor visit this try catch block.
- *
- * @param mv
- * a method visitor.
- */
- public void accept(final MethodVisitor mv) {
- mv.visitTryCatchBlock(start.getLabel(), end.getLabel(),
- handler == null ? null : handler.getLabel(), type);
- int n = visibleTypeAnnotations == null ? 0 : visibleTypeAnnotations
- .size();
- for (int i = 0; i < n; ++i) {
- TypeAnnotationNode an = visibleTypeAnnotations.get(i);
- an.accept(mv.visitTryCatchAnnotation(an.typeRef, an.typePath,
- an.desc, true));
- }
- n = invisibleTypeAnnotations == null ? 0 : invisibleTypeAnnotations
- .size();
- for (int i = 0; i < n; ++i) {
- TypeAnnotationNode an = invisibleTypeAnnotations.get(i);
- an.accept(mv.visitTryCatchAnnotation(an.typeRef, an.typePath,
- an.desc, false));
- }
+ /**
+ * Makes the given visitor visit this try catch block.
+ *
+ * @param methodVisitor a method visitor.
+ */
+ public void accept(final MethodVisitor methodVisitor) {
+ methodVisitor.visitTryCatchBlock(
+ start.getLabel(), end.getLabel(), handler == null ? null : handler.getLabel(), type);
+ if (visibleTypeAnnotations != null) {
+ for (int i = 0, n = visibleTypeAnnotations.size(); i < n; ++i) {
+ TypeAnnotationNode typeAnnotation = visibleTypeAnnotations.get(i);
+ typeAnnotation.accept(
+ methodVisitor.visitTryCatchAnnotation(
+ typeAnnotation.typeRef, typeAnnotation.typePath, typeAnnotation.desc, true));
+ }
+ }
+ if (invisibleTypeAnnotations != null) {
+ for (int i = 0, n = invisibleTypeAnnotations.size(); i < n; ++i) {
+ TypeAnnotationNode typeAnnotation = invisibleTypeAnnotations.get(i);
+ typeAnnotation.accept(
+ methodVisitor.visitTryCatchAnnotation(
+ typeAnnotation.typeRef, typeAnnotation.typePath, typeAnnotation.desc, false));
+ }
}
+ }
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TypeAnnotationNode.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TypeAnnotationNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TypeAnnotationNode.java
old mode 100644
new mode 100755
index 43445ae..e3c58cd
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TypeAnnotationNode.java
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TypeAnnotationNode.java
@@ -1,100 +1,85 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2011 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.apache.tapestry5.internal.plastic.asm.tree;
-
-import org.apache.tapestry5.internal.plastic.asm.Opcodes;
-import org.apache.tapestry5.internal.plastic.asm.TypePath;
-import org.apache.tapestry5.internal.plastic.asm.TypeReference;
-
-/**
- * A node that represents a type annotationn.
- *
- * @author Eric Bruneton
- */
-public class TypeAnnotationNode extends AnnotationNode {
-
- /**
- * A reference to the annotated type. See {@link TypeReference}.
- */
- public int typeRef;
-
- /**
- * The path to the annotated type argument, wildcard bound, array element
- * type, or static outer type within the referenced type. May be
- * <tt>null</tt> if the annotation targets 'typeRef' as a whole.
- */
- public TypePath typePath;
-
- /**
- * Constructs a new {@link AnnotationNode}. <i>Subclasses must not use this
- * constructor</i>. Instead, they must use the
- * {@link #TypeAnnotationNode(int, int, TypePath, String)} version.
- *
- * @param typeRef
- * a reference to the annotated type. See {@link TypeReference}.
- * @param typePath
- * the path to the annotated type argument, wildcard bound, array
- * element type, or static inner type within 'typeRef'. May be
- * <tt>null</tt> if the annotation targets 'typeRef' as a whole.
- * @param desc
- * the class descriptor of the annotation class.
- * @throws IllegalStateException
- * If a subclass calls this constructor.
- */
- public TypeAnnotationNode(final int typeRef, final TypePath typePath,
- final String desc) {
- this(Opcodes.ASM6, typeRef, typePath, desc);
- if (getClass() != TypeAnnotationNode.class) {
- throw new IllegalStateException();
- }
- }
-
- /**
- * Constructs a new {@link AnnotationNode}.
- *
- * @param api
- * the ASM API version implemented by this visitor. Must be one
- * of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
- * @param typeRef
- * a reference to the annotated type. See {@link TypeReference}.
- * @param typePath
- * the path to the annotated type argument, wildcard bound, array
- * element type, or static inner type within 'typeRef'. May be
- * <tt>null</tt> if the annotation targets 'typeRef' as a whole.
- * @param desc
- * the class descriptor of the annotation class.
- */
- public TypeAnnotationNode(final int api, final int typeRef,
- final TypePath typePath, final String desc) {
- super(api, desc);
- this.typeRef = typeRef;
- this.typePath = typePath;
- }
-}
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
+package org.apache.tapestry5.internal.plastic.asm.tree;
+
+import org.apache.tapestry5.internal.plastic.asm.Opcodes;
+import org.apache.tapestry5.internal.plastic.asm.TypePath;
+
+/**
+ * A node that represents a type annotation.
+ *
+ * @author Eric Bruneton
+ */
+public class TypeAnnotationNode extends AnnotationNode {
+
+ /** A reference to the annotated type. See {@link org.apache.tapestry5.internal.plastic.asm.TypeReference}. */
+ public int typeRef;
+
+ /**
+ * The path to the annotated type argument, wildcard bound, array element type, or static outer
+ * type within the referenced type. May be {@literal null} if the annotation targets 'typeRef' as
+ * a whole.
+ */
+ public TypePath typePath;
+
+ /**
+ * Constructs a new {@link AnnotationNode}. <i>Subclasses must not use this constructor</i>.
+ * Instead, they must use the {@link #TypeAnnotationNode(int, int, TypePath, String)} version.
+ *
+ * @param typeRef a reference to the annotated type. See {@link org.apache.tapestry5.internal.plastic.asm.TypeReference}.
+ * @param typePath the path to the annotated type argument, wildcard bound, array element type, or
+ * static inner type within 'typeRef'. May be {@literal null} if the annotation targets
+ * 'typeRef' as a whole.
+ * @param descriptor the class descriptor of the annotation class.
+ * @throws IllegalStateException If a subclass calls this constructor.
+ */
+ public TypeAnnotationNode(final int typeRef, final TypePath typePath, final String descriptor) {
+ this(Opcodes.ASM7, typeRef, typePath, descriptor);
+ if (getClass() != TypeAnnotationNode.class) {
+ throw new IllegalStateException();
+ }
+ }
+
+ /**
+ * Constructs a new {@link AnnotationNode}.
+ *
+ * @param api the ASM API version implemented by this visitor. Must be one of {@link
+ * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
+ * @param typeRef a reference to the annotated type. See {@link org.apache.tapestry5.internal.plastic.asm.TypeReference}.
+ * @param typePath the path to the annotated type argument, wildcard bound, array element type, or
+ * static inner type within 'typeRef'. May be {@literal null} if the annotation targets
+ * 'typeRef' as a whole.
+ * @param descriptor the class descriptor of the annotation class.
+ */
+ public TypeAnnotationNode(
+ final int api, final int typeRef, final TypePath typePath, final String descriptor) {
+ super(api, descriptor);
+ this.typeRef = typeRef;
+ this.typePath = typePath;
+ }
+}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TypeInsnNode.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TypeInsnNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TypeInsnNode.java
old mode 100644
new mode 100755
index 9811d25..d97d940
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TypeInsnNode.java
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/TypeInsnNode.java
@@ -1,91 +1,85 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2011 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
package org.apache.tapestry5.internal.plastic.asm.tree;
import java.util.Map;
-
import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
/**
- * A node that represents a type instruction. A type instruction is an
- * instruction that takes a type descriptor as parameter.
- *
+ * A node that represents a type instruction. A type instruction is an instruction that takes a type
+ * descriptor as parameter.
+ *
* @author Eric Bruneton
*/
public class TypeInsnNode extends AbstractInsnNode {
- /**
- * The operand of this instruction. This operand is an internal name (see
- * {@link org.objectweb.asm.Type}).
- */
- public String desc;
+ /**
+ * The operand of this instruction. This operand is an internal name (see {@link
+ * org.apache.tapestry5.internal.plastic.asm.Type}).
+ */
+ public String desc;
- /**
- * Constructs a new {@link TypeInsnNode}.
- *
- * @param opcode
- * the opcode of the type instruction to be constructed. This
- * opcode must be NEW, ANEWARRAY, CHECKCAST or INSTANCEOF.
- * @param desc
- * the operand of the instruction to be constructed. This operand
- * is an internal name (see {@link org.objectweb.asm.Type}).
- */
- public TypeInsnNode(final int opcode, final String desc) {
- super(opcode);
- this.desc = desc;
- }
+ /**
+ * Constructs a new {@link TypeInsnNode}.
+ *
+ * @param opcode the opcode of the type instruction to be constructed. This opcode must be NEW,
+ * ANEWARRAY, CHECKCAST or INSTANCEOF.
+ * @param descriptor the operand of the instruction to be constructed. This operand is an internal
+ * name (see {@link org.apache.tapestry5.internal.plastic.asm.Type}).
+ */
+ public TypeInsnNode(final int opcode, final String descriptor) {
+ super(opcode);
+ this.desc = descriptor;
+ }
- /**
- * Sets the opcode of this instruction.
- *
- * @param opcode
- * the new instruction opcode. This opcode must be NEW,
- * ANEWARRAY, CHECKCAST or INSTANCEOF.
- */
- public void setOpcode(final int opcode) {
- this.opcode = opcode;
- }
+ /**
+ * Sets the opcode of this instruction.
+ *
+ * @param opcode the new instruction opcode. This opcode must be NEW, ANEWARRAY, CHECKCAST or
+ * INSTANCEOF.
+ */
+ public void setOpcode(final int opcode) {
+ this.opcode = opcode;
+ }
- @Override
- public int getType() {
- return TYPE_INSN;
- }
+ @Override
+ public int getType() {
+ return TYPE_INSN;
+ }
- @Override
- public void accept(final MethodVisitor mv) {
- mv.visitTypeInsn(opcode, desc);
- acceptAnnotations(mv);
- }
+ @Override
+ public void accept(final MethodVisitor methodVisitor) {
+ methodVisitor.visitTypeInsn(opcode, desc);
+ acceptAnnotations(methodVisitor);
+ }
- @Override
- public AbstractInsnNode clone(final Map<LabelNode, LabelNode> labels) {
- return new TypeInsnNode(opcode, desc).cloneAnnotations(this);
- }
-}
\ No newline at end of file
+ @Override
+ public AbstractInsnNode clone(final Map<LabelNode, LabelNode> clonedLabels) {
+ return new TypeInsnNode(opcode, desc).cloneAnnotations(this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/UnsupportedClassVersionException.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/UnsupportedClassVersionException.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/UnsupportedClassVersionException.java
new file mode 100755
index 0000000..dc2161e
--- /dev/null
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/UnsupportedClassVersionException.java
@@ -0,0 +1,14 @@
+package org.apache.tapestry5.internal.plastic.asm.tree;
+
+/**
+ * Exception thrown in {@link AnnotationNode#check}, {@link ClassNode#check}, {@link
+ * FieldNode#check} and {@link MethodNode#check} when these nodes (or their children, recursively)
+ * contain elements that were introduced in more recent versions of the ASM API than version passed
+ * to these methods.
+ *
+ * @author Eric Bruneton
+ */
+public class UnsupportedClassVersionException extends RuntimeException {
+
+ private static final long serialVersionUID = -3502347765891805831L;
+}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/Util.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/Util.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/Util.java
new file mode 100755
index 0000000..bf5d75f
--- /dev/null
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/Util.java
@@ -0,0 +1,157 @@
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
+package org.apache.tapestry5.internal.plastic.asm.tree;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Utility methods to convert an array of primitive or object values to a mutable ArrayList, not
+ * baked by the array (unlike {@link java.util.Arrays#asList}).
+ *
+ * @author Eric Bruneton
+ */
+final class Util {
+
+ private Util() {}
+
+ static <T> List<T> asArrayList(final int length) {
+ List<T> list = new ArrayList<T>(length);
+ for (int i = 0; i < length; ++i) {
+ list.add(null);
+ }
+ return list;
+ }
+
+ static <T> List<T> asArrayList(final T[] array) {
+ if (array == null) {
+ return new ArrayList<T>();
+ }
+ ArrayList<T> list = new ArrayList<T>(array.length);
+ for (T t : array) {
+ list.add(t);
+ }
+ return list;
+ }
+
+ static List<Byte> asArrayList(final byte[] byteArray) {
+ if (byteArray == null) {
+ return new ArrayList<Byte>();
+ }
+ ArrayList<Byte> byteList = new ArrayList<Byte>(byteArray.length);
+ for (byte b : byteArray) {
+ byteList.add(b);
+ }
+ return byteList;
+ }
+
+ static List<Boolean> asArrayList(final boolean[] booleanArray) {
+ if (booleanArray == null) {
+ return new ArrayList<Boolean>();
+ }
+ ArrayList<Boolean> booleanList = new ArrayList<Boolean>(booleanArray.length);
+ for (boolean b : booleanArray) {
+ booleanList.add(b);
+ }
+ return booleanList;
+ }
+
+ static List<Short> asArrayList(final short[] shortArray) {
+ if (shortArray == null) {
+ return new ArrayList<Short>();
+ }
+ ArrayList<Short> shortList = new ArrayList<Short>(shortArray.length);
+ for (short s : shortArray) {
+ shortList.add(s);
+ }
+ return shortList;
+ }
+
+ static List<Character> asArrayList(final char[] charArray) {
+ if (charArray == null) {
+ return new ArrayList<Character>();
+ }
+ ArrayList<Character> charList = new ArrayList<Character>(charArray.length);
+ for (char c : charArray) {
+ charList.add(c);
+ }
+ return charList;
+ }
+
+ static List<Integer> asArrayList(final int[] intArray) {
+ if (intArray == null) {
+ return new ArrayList<Integer>();
+ }
+ ArrayList<Integer> intList = new ArrayList<Integer>(intArray.length);
+ for (int i : intArray) {
+ intList.add(i);
+ }
+ return intList;
+ }
+
+ static List<Float> asArrayList(final float[] floatArray) {
+ if (floatArray == null) {
+ return new ArrayList<Float>();
+ }
+ ArrayList<Float> floatList = new ArrayList<Float>(floatArray.length);
+ for (float f : floatArray) {
+ floatList.add(f);
+ }
+ return floatList;
+ }
+
+ static List<Long> asArrayList(final long[] longArray) {
+ if (longArray == null) {
+ return new ArrayList<Long>();
+ }
+ ArrayList<Long> longList = new ArrayList<Long>(longArray.length);
+ for (long l : longArray) {
+ longList.add(l);
+ }
+ return longList;
+ }
+
+ static List<Double> asArrayList(final double[] doubleArray) {
+ if (doubleArray == null) {
+ return new ArrayList<Double>();
+ }
+ ArrayList<Double> doubleList = new ArrayList<Double>(doubleArray.length);
+ for (double d : doubleArray) {
+ doubleList.add(d);
+ }
+ return doubleList;
+ }
+
+ static <T> List<T> asArrayList(final int length, final T[] array) {
+ List<T> list = new ArrayList<T>(length);
+ for (int i = 0; i < length; ++i) {
+ list.add(array[i]); // NOPMD(UseArraysAsList): we convert a part of the array.
+ }
+ return list;
+ }
+}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1c71aec7/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/VarInsnNode.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/VarInsnNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/VarInsnNode.java
old mode 100644
new mode 100755
index 58552de..1208c17
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/VarInsnNode.java
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/VarInsnNode.java
@@ -1,94 +1,82 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2011 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+// ASM: a very small and fast Java bytecode manipulation framework
+// Copyright (c) 2000-2011 INRIA, France Telecom
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. Neither the name of the copyright holders nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+// THE POSSIBILITY OF SUCH DAMAGE.
package org.apache.tapestry5.internal.plastic.asm.tree;
import java.util.Map;
-
import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
/**
- * A node that represents a local variable instruction. A local variable
- * instruction is an instruction that loads or stores the value of a local
- * variable.
- *
+ * A node that represents a local variable instruction. A local variable instruction is an
+ * instruction that loads or stores the value of a local variable.
+ *
* @author Eric Bruneton
*/
public class VarInsnNode extends AbstractInsnNode {
- /**
- * The operand of this instruction. This operand is the index of a local
- * variable.
- */
- public int var;
+ /** The operand of this instruction. This operand is the index of a local variable. */
+ public int var;
- /**
- * Constructs a new {@link VarInsnNode}.
- *
- * @param opcode
- * the opcode of the local variable instruction to be
- * constructed. This opcode must be ILOAD, LLOAD, FLOAD, DLOAD,
- * ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or RET.
- * @param var
- * the operand of the instruction to be constructed. This operand
- * is the index of a local variable.
- */
- public VarInsnNode(final int opcode, final int var) {
- super(opcode);
- this.var = var;
- }
+ /**
+ * Constructs a new {@link VarInsnNode}.
+ *
+ * @param opcode the opcode of the local variable instruction to be constructed. This opcode must
+ * be ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or RET.
+ * @param var the operand of the instruction to be constructed. This operand is the index of a
+ * local variable.
+ */
+ public VarInsnNode(final int opcode, final int var) {
+ super(opcode);
+ this.var = var;
+ }
- /**
- * Sets the opcode of this instruction.
- *
- * @param opcode
- * the new instruction opcode. This opcode must be ILOAD, LLOAD,
- * FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or
- * RET.
- */
- public void setOpcode(final int opcode) {
- this.opcode = opcode;
- }
+ /**
+ * Sets the opcode of this instruction.
+ *
+ * @param opcode the new instruction opcode. This opcode must be ILOAD, LLOAD, FLOAD, DLOAD,
+ * ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or RET.
+ */
+ public void setOpcode(final int opcode) {
+ this.opcode = opcode;
+ }
- @Override
- public int getType() {
- return VAR_INSN;
- }
+ @Override
+ public int getType() {
+ return VAR_INSN;
+ }
- @Override
- public void accept(final MethodVisitor mv) {
- mv.visitVarInsn(opcode, var);
- acceptAnnotations(mv);
- }
+ @Override
+ public void accept(final MethodVisitor methodVisitor) {
+ methodVisitor.visitVarInsn(opcode, var);
+ acceptAnnotations(methodVisitor);
+ }
- @Override
- public AbstractInsnNode clone(final Map<LabelNode, LabelNode> labels) {
- return new VarInsnNode(opcode, var).cloneAnnotations(this);
- }
-}
\ No newline at end of file
+ @Override
+ public AbstractInsnNode clone(final Map<LabelNode, LabelNode> clonedLabels) {
+ return new VarInsnNode(opcode, var).cloneAnnotations(this);
+ }
+}