|
From: <ls...@us...> - 2007-01-07 13:36:57
|
Revision: 3028
http://jnode.svn.sourceforge.net/jnode/?rev=3028&view=rev
Author: lsantha
Date: 2007-01-07 05:36:55 -0800 (Sun, 07 Jan 2007)
Log Message:
-----------
Classpath patches.
Added Paths:
-----------
trunk/core/src/classpath/org/org/objectweb/
trunk/core/src/classpath/org/org/objectweb/asm/
trunk/core/src/classpath/org/org/objectweb/asm/attrs/
trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapAttribute.java
trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapFrame.java
trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapTableAttribute.java
trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapType.java
trunk/core/src/classpath/org/org/objectweb/asm/attrs/package.html
Added: trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapAttribute.java
===================================================================
--- trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapAttribute.java (rev 0)
+++ trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapAttribute.java 2007-01-07 13:36:55 UTC (rev 3028)
@@ -0,0 +1,378 @@
+/**
+ * ASM: a very small and fast Java bytecode manipulation framework
+ * Copyright (c) 2000-2005 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.objectweb.asm.attrs;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.objectweb.asm.Attribute;
+import org.objectweb.asm.ByteVector;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Label;
+
+/**
+ * StackMapAttribute is used by CDLC preverifier. Definition is given in
+ * appendix "CLDC Byte Code Typechecker Specification" from CDLC 1.1
+ * specification. <p> <i>Note that this implementation does not calculate
+ * StackMapFrame structures from the method bytecode. If method code is changed
+ * or generated from scratch, then developer is responsible to prepare a correct
+ * StackMapFrame structures.</i> <p> The format of the stack map in the class
+ * file is given below. In the following, <ul> <li>if the length of the
+ * method's byte code1 is 65535 or less, then <tt>uoffset</tt> represents the
+ * type u2; otherwise <tt>uoffset</tt> represents the type u4.</li> <li>If
+ * the maximum number of local variables for the method is 65535 or less, then
+ * <tt>ulocalvar</tt> represents the type u2; otherwise <tt>ulocalvar</tt>
+ * represents the type u4.</li> <li>If the maximum size of the operand stack
+ * is 65535 or less, then <tt>ustack</tt> represents the type u2; otherwise
+ * ustack represents the type u4.</li> </ul>
+ *
+ * <pre>
+ * stack_map { // attribute StackMap
+ * u2 attribute_name_index;
+ * u4 attribute_length
+ * uoffset number_of_entries;
+ * stack_map_frame entries[number_of_entries];
+ * }
+ * </pre>
+ *
+ * Each stack map frame has the following format:
+ *
+ * <pre>
+ * stack_map_frame {
+ * uoffset offset;
+ * ulocalvar number_of_locals;
+ * verification_type_info locals[number_of_locals];
+ * ustack number_of_stack_items;
+ * verification_type_info stack[number_of_stack_items];
+ * }
+ * </pre>
+ *
+ * The <tt>verification_type_info</tt> structure consists of a one-byte tag
+ * followed by zero or more bytes, giving more information about the tag. Each
+ * <tt>verification_type_info</tt> structure specifies the verification type
+ * of one or two locations.
+ *
+ * <pre>
+ * union verification_type_info {
+ * Top_variable_info;
+ * Integer_variable_info;
+ * Float_variable_info;
+ * Long_variable_info;
+ * Double_variable_info;
+ * Null_variable_info;
+ * UninitializedThis_variable_info;
+ * Object_variable_info;
+ * Uninitialized_variable_info;
+ * }
+ *
+ * Top_variable_info {
+ * u1 tag = ITEM_Top; // 0
+ * }
+ *
+ * Integer_variable_info {
+ * u1 tag = ITEM_Integer; // 1
+ * }
+ *
+ * Float_variable_info {
+ * u1 tag = ITEM_Float; // 2
+ * }
+ *
+ * Long_variable_info {
+ * u1 tag = ITEM_Long; // 4
+ * }
+ *
+ * Double_variable_info {
+ * u1 tag = ITEM_Double; // 3
+ * }
+ *
+ * Null_variable_info {
+ * u1 tag = ITEM_Null; // 5
+ * }
+ *
+ * UninitializedThis_variable_info {
+ * u1 tag = ITEM_UninitializedThis; // 6
+ * }
+ *
+ * Object_variable_info {
+ * u1 tag = ITEM_Object; // 7
+ * u2 cpool_index;
+ * }
+ *
+ * Uninitialized_variable_info {
+ * u1 tag = ITEM_Uninitialized // 8
+ * uoffset offset;
+ * }
+ * </pre>
+ *
+ * @see <a href="http://www.jcp.org/en/jsr/detail?id=139">JSR 139 : Connected
+ * Limited Device Configuration 1.1</a>
+ *
+ * @author Eugene Kuleshov
+ */
+public class StackMapAttribute extends Attribute {
+
+ static final int MAX_SIZE = 65535;
+
+ /**
+ * A List of <code>StackMapFrame</code> instances.
+ */
+ public List frames = new ArrayList();
+
+ public StackMapAttribute() {
+ super("StackMap");
+ }
+
+ public StackMapAttribute(List frames) {
+ this();
+ this.frames = frames;
+ }
+
+ public List getFrames() {
+ return frames;
+ }
+
+ public StackMapFrame getFrame(Label label) {
+ for (int i = 0; i < frames.size(); i++) {
+ StackMapFrame frame = (StackMapFrame) frames.get(i);
+ if (frame.label == label) {
+ return frame;
+ }
+ }
+ return null;
+ }
+
+ public boolean isUnknown() {
+ return false;
+ }
+
+ public boolean isCodeAttribute() {
+ return true;
+ }
+
+ protected Attribute read(
+ ClassReader cr,
+ int off,
+ int len,
+ char[] buf,
+ int codeOff,
+ Label[] labels)
+ {
+ StackMapAttribute attr = new StackMapAttribute();
+ // note that this is not the size of Code attribute
+ boolean isExtCodeSize = cr.readInt(codeOff + 4) > MAX_SIZE;
+ boolean isExtLocals = cr.readUnsignedShort(codeOff + 2) > MAX_SIZE;
+ boolean isExtStack = cr.readUnsignedShort(codeOff) > MAX_SIZE;
+
+ int size = 0;
+ if (isExtCodeSize) {
+ size = cr.readInt(off);
+ off += 4;
+ } else {
+ size = cr.readUnsignedShort(off);
+ off += 2;
+ }
+ for (int i = 0; i < size; i++) {
+ int offset;
+ if (isExtCodeSize) {
+ offset = cr.readInt(off);
+ off += 4;
+ } else {
+ offset = cr.readUnsignedShort(off);
+ off += 2;
+ }
+
+ Label label = getLabel(offset, labels);
+ List locals = new ArrayList();
+ List stack = new ArrayList();
+
+ off = readTypeInfo(cr,
+ off,
+ locals,
+ labels,
+ buf,
+ isExtLocals,
+ isExtCodeSize);
+ off = readTypeInfo(cr,
+ off,
+ stack,
+ labels,
+ buf,
+ isExtStack,
+ isExtCodeSize);
+
+ attr.frames.add(new StackMapFrame(label, locals, stack));
+ }
+ return attr;
+ }
+
+ private int readTypeInfo(
+ ClassReader cr,
+ int off,
+ List info,
+ Label[] labels,
+ char[] buf,
+ boolean isExt,
+ boolean isExtCode)
+ {
+ int n = 0;
+ if (isExt) {
+ n = cr.readInt(off);
+ off += 4;
+ } else {
+ n = cr.readUnsignedShort(off);
+ off += 2;
+ }
+ for (int j = 0; j < n; j++) {
+ int itemType = cr.readByte(off++);
+ StackMapType typeInfo = StackMapType.getTypeInfo(itemType);
+ info.add(typeInfo);
+ switch (itemType) {
+ case StackMapType.ITEM_Object: //
+ typeInfo.setObject(cr.readClass(off, buf));
+ off += 2;
+ break;
+ case StackMapType.ITEM_Uninitialized: //
+ int offset;
+ if (isExtCode) {
+ offset = cr.readInt(off);
+ off += 4;
+ } else {
+ offset = cr.readUnsignedShort(off);
+ off += 2;
+ }
+ typeInfo.setLabel(getLabel(offset, labels));
+ break;
+ }
+ }
+ return off;
+ }
+
+ private void writeTypeInfo(ByteVector bv, ClassWriter cw, List info, int max)
+ {
+ if (max > StackMapAttribute.MAX_SIZE) {
+ bv.putInt(info.size());
+ } else {
+ bv.putShort(info.size());
+ }
+ for (int j = 0; j < info.size(); j++) {
+ StackMapType typeInfo = (StackMapType) info.get(j);
+ bv.putByte(typeInfo.getType());
+ switch (typeInfo.getType()) {
+ case StackMapType.ITEM_Object: //
+ bv.putShort(cw.newClass(typeInfo.getObject()));
+ break;
+
+ case StackMapType.ITEM_Uninitialized: //
+ bv.putShort(typeInfo.getLabel().getOffset());
+ break;
+
+ }
+ }
+ }
+
+ private Label getLabel(int offset, Label[] labels) {
+ Label l = labels[offset];
+ if (l != null) {
+ return l;
+ }
+ return labels[offset] = new Label();
+ }
+
+ protected ByteVector write(
+ ClassWriter cw,
+ byte[] code,
+ int len,
+ int maxStack,
+ int maxLocals)
+ {
+ ByteVector bv = new ByteVector();
+ if (code != null && code.length > MAX_SIZE) { // TODO verify value
+ bv.putInt(frames.size());
+ } else {
+ bv.putShort(frames.size());
+ }
+ for (int i = 0; i < frames.size(); i++) {
+ writeFrame((StackMapFrame) frames.get(i),
+ cw,
+ maxStack,
+ maxLocals,
+ bv);
+ }
+ return bv;
+ }
+
+ protected Label[] getLabels() {
+ HashSet labels = new HashSet();
+ for (int i = 0; i < frames.size(); i++) {
+ getFrameLabels((StackMapFrame) frames.get(i), labels);
+ }
+ return (Label[]) labels.toArray(new Label[labels.size()]);
+ }
+
+ private void writeFrame(
+ StackMapFrame frame,
+ ClassWriter cw,
+ int maxStack,
+ int maxLocals,
+ ByteVector bv)
+ {
+ bv.putShort(frame.label.getOffset());
+ writeTypeInfo(bv, cw, frame.locals, maxLocals);
+ writeTypeInfo(bv, cw, frame.stack, maxStack);
+ }
+
+ private void getFrameLabels(StackMapFrame frame, Set labels) {
+ labels.add(frame.label);
+ getTypeInfoLabels(labels, frame.locals);
+ getTypeInfoLabels(labels, frame.stack);
+ }
+
+ private void getTypeInfoLabels(Set labels, List info) {
+ for (Iterator it = info.iterator(); it.hasNext();) {
+ StackMapType typeInfo = (StackMapType) it.next();
+ if (typeInfo.getType() == StackMapType.ITEM_Uninitialized) {
+ labels.add(typeInfo.getLabel());
+ }
+ }
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer("StackMap[");
+ for (int i = 0; i < frames.size(); i++) {
+ sb.append('\n').append('[').append(frames.get(i)).append(']');
+ }
+ sb.append("\n]");
+ return sb.toString();
+ }
+}
Added: trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapFrame.java
===================================================================
--- trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapFrame.java (rev 0)
+++ trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapFrame.java 2007-01-07 13:36:55 UTC (rev 3028)
@@ -0,0 +1,82 @@
+/**
+ * ASM: a very small and fast Java bytecode manipulation framework
+ * Copyright (c) 2000-2005 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.objectweb.asm.attrs;
+
+import java.util.List;
+
+import org.objectweb.asm.Label;
+
+/**
+ * Holds the state of the stack and local variables for a single execution
+ * branch.
+ *
+ * <i>Note that Long and Double types are represented by two entries in locals
+ * and stack. Second entry should be always of type Top.</i>
+ *
+ * @see <a href="http://www.jcp.org/en/jsr/detail?id=139">JSR 139 : Connected
+ * Limited Device Configuration 1.1</a>
+ *
+ * @see "ClassFileFormat-Java6.fm Page 138 Friday, April 15, 2005 3:22 PM"
+ *
+ * @author Eugene Kuleshov
+ */
+public class StackMapFrame {
+
+ /**
+ * A <code>Label</code> for frame offset within method bytecode.
+ */
+ public Label label;
+
+ /**
+ * A List of <code>StackMapType</code> instances that represent locals for
+ * this frame.
+ */
+ public List locals;
+
+ /**
+ * A List of <code>StackMapType</code> instances that represent stack for
+ * this frame.
+ */
+ public List stack;
+
+ public StackMapFrame(Label label, List locals, List stack) {
+ this.label = label;
+ this.locals = locals;
+ this.stack = stack;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer("Frame:L");
+ sb.append(System.identityHashCode(label));
+ sb.append(" locals").append(locals);
+ sb.append(" stack").append(stack);
+ return sb.toString();
+ }
+}
Added: trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapTableAttribute.java
===================================================================
--- trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapTableAttribute.java (rev 0)
+++ trunk/core/src/classpath/org/org/objectweb/asm/attrs/StackMapTableAttribute.java 2007-01-07 13:36:55 UTC (rev 3028)
@@ -0,0 +1,927 @@
+/**
+ * ASM: a very small and fast Java bytecode manipulation framework
+ * Copyright (c) 2000-2005 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.objectweb.asm.attrs;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.objectweb.asm.Attribute;
+import org.objectweb.asm.ByteVector;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.Type;
+
+/**
+ * The stack map attribute is used during the process of verification by
+ * typechecking (\xA74.11.1). <br> <br> A stack map attribute consists of zero or
+ * more stack map frames. Each stack map frame specifies (either explicitly or
+ * implicitly) a bytecode offset, the verification types (\xA74.11.1) for the local
+ * variables, and the verification types for the operand stack. <br> <br> The
+ * type checker deals with and manipulates the expected types of a method's
+ * local variables and operand stack. Throughout this section, a location refers
+ * to either a single local variable or to a single operand stack entry. <br>
+ * <br> We will use the terms stack frame map and type state interchangeably to
+ * describe a mapping from locations in the operand stack and local variables of
+ * a method to verification types. We will usually use the term stack frame map
+ * when such a mapping is provided in the class file, and the term type state
+ * when the mapping is inferred by the type checker. <br> <br> If a method's
+ * Code attribute does not have a StackMapTable attribute, it has an implicit
+ * stack map attribute. This implicit stack map attribute is equivalent to a
+ * StackMapTable attribute with number_of_entries equal to zero. A method's Code
+ * attribute may have at most one StackMapTable attribute, otherwise a
+ * java.lang.ClassFormatError is thrown. <br> <br> The format of the stack map
+ * in the class file is given below. In the following, if the length of the
+ * method's byte code is 65535 or less, then uoffset represents the type u2;
+ * otherwise uoffset represents the type u4. If the maximum number of local
+ * variables for the method is 65535 or less, then <code>ulocalvar</code>
+ * represents the type u2; otherwise ulocalvar represents the type u4. If the
+ * maximum size of the operand stack is 65535 or less, then <code>ustack</code>
+ * represents the type u2; otherwise ustack represents the type u4.
+ *
+ * <pre>
+ * stack_map { // attribute StackMapTable
+ * u2 attribute_name_index;
+ * u4 attribute_length
+ * uoffset number_of_entries;
+ * stack_map_frame entries[number_of_entries];
+ * }
+ * </pre>
+ *
+ * Each stack_map_frame structure specifies the type state at a particular byte
+ * code offset. Each frame type specifies (explicitly or implicitly) a value,
+ * offset_delta, that is used to calulate the actual byte code offset at which
+ * it applies. The byte code offset at which the frame applies is given by
+ * adding <code>1 + offset_delta</code> to the <code>offset</code> of the
+ * previous frame, unless the previous frame is the initial frame of the method,
+ * in which case the byte code offset is <code>offset_delta</code>. <br> <br>
+ * <i>Note that the length of the byte codes is not the same as the length of
+ * the Code attribute. The byte codes are embedded in the Code attribute, along
+ * with other information.</i> <br> <br> By using an offset delta rather than
+ * the actual byte code offset we ensure, by definition, that stack map frames
+ * are in the correctly sorted order. Furthermore, by consistently using the
+ * formula <code>offset_delta + 1</code> for all explicit frames, we guarantee
+ * the absence of duplicates. <br> <br> All frame types, even full_frame, rely
+ * on the previous frame for some of their semantics. This raises the question
+ * of what is the very first frame? The initial frame is implicit, and computed
+ * from the method descriptor. See the Prolog code for methodInitialStacFrame.
+ * <br> <br> The stack_map_frame structure consists of a one-byte tag followed
+ * by zero or more bytes, giving more information, depending upon the tag. <br>
+ * <br> A stack map frame may belong to one of several frame types
+ *
+ * <pre>
+ * union stack_map_frame {
+ * same_frame;
+ * same_locals_1_stack_item_frame;
+ * chop_frame;
+ * same_frame_extended;
+ * append_frame;
+ * full_frame;
+ * }
+ * </pre>
+ *
+ * The frame type same_frame is represented by tags in the range [0-63]. If the
+ * frame type is same_frame, it means the frame has exactly the same locals as
+ * the previous stack map frame and that the number of stack items is zero. The
+ * offset_delta value for the frame is the value of the tag field, frame_type.
+ * The form of such a frame is then:
+ *
+ * <pre>
+ * same_frame {
+ * u1 frame_type = SAME; // 0-63
+ * }
+ * </pre>
+ *
+ * The frame type same_locals_1_stack_item_frame is represented by tags in the
+ * range [64, 127]. If the frame_type is same_locals_1_stack_item_frame, it
+ * means the frame has exactly the same locals as the previous stack map frame
+ * and that the number of stack items is 1. The offset_delta value for the frame
+ * is the value (frame_type - 64). There is a verification_type_info following
+ * the frame_type for the one stack item. The form of such a frame is then:
+ *
+ * <pre>
+ * same_locals_1_stack_item_frame {
+ * u1 frame_type = SAME_LOCALS_1_STACK_ITEM; // 64-127
+ * verification_type_info stack[1];
+ * }
+ * </pre>
+ *
+ * Tags in the range [128-247] are reserved for future use. <br> <br> The frame
+ * type chop_frame is represented by tags in the range [248-250]. If the
+ * frame_type is chop_frame, it means that the current locals are the same as
+ * the locals in the previous frame, except that the k last locals are absent.
+ * The value of k is given by the formula 251-frame_type. <br> <br> The form of
+ * such a frame is then:
+ *
+ * <pre>
+ * chop_frame {
+ * u1 frame_type=CHOP; // 248-250
+ * uoffset offset_delta;
+ * }
+ * </pre>
+ *
+ * The frame type same_frame_extended is represented by the tag value 251. If
+ * the frame type is same_frame_extended, it means the frame has exactly the
+ * same locals as the previous stack map frame and that the number of stack
+ * items is zero. The form of such a frame is then:
+ *
+ * <pre>
+ * same_frame_extended {
+ * u1 frame_type = SAME_FRAME_EXTENDED; // 251
+ * uoffset offset_delta;
+ * }
+ * </pre>
+ *
+ * The frame type append_frame is represented by tags in the range [252-254]. If
+ * the frame_type is append_frame, it means that the current locals are the same
+ * as the locals in the previous frame, except that k additional locals are
+ * defined. The value of k is given by the formula frame_type-251. <br> <br> The
+ * form of such a frame is then:
+ *
+ * <pre>
+ * append_frame {
+ * u1 frame_type =APPEND; // 252-254
+ * uoffset offset_delta;
+ * verification_type_info locals[frame_type -251];
+ * }
+ * </pre>
+ *
+ * The 0th entry in locals represents the type of the first additional local
+ * variable. If locals[M] represents local variable N, then locals[M+1]
+ * represents local variable N+1 if locals[M] is one of Top_variable_info,
+ * Integer_variable_info, Float_variable_info, Null_variable_info,
+ * UninitializedThis_variable_info, Object_variable_info, or
+ * Uninitialized_variable_info, otherwise locals[M+1] represents local variable
+ * N+2. It is an error if, for any index i, locals[i] represents a local
+ * variable whose index is greater than the maximum number of local variables
+ * for the method. <br> <br> The frame type full_frame is represented by the tag
+ * value 255. The form of such a frame is then:
+ *
+ * <pre>
+ * full_frame {
+ * u1 frame_type = FULL_FRAME; // 255
+ * uoffset offset_delta;
+ * ulocalvar number_of_locals;
+ * verification_type_info locals[number_of_locals];
+ * ustack number_of_stack_items;
+ * verification_type_info stack[number_of_stack_items];
+ * }
+ * </pre>
+ *
+ * The 0th entry in locals represents the type of local variable 0. If locals[M]
+ * represents local variable N, then locals[M+1] represents local variable N+1
+ * if locals[M] is one of Top_variable_info, Integer_variable_info,
+ * Float_variable_info, Null_variable_info, UninitializedThis_variable_info,
+ * Object_variable_info, or Uninitialized_variable_info, otherwise locals[M+1]
+ * represents local variable N+2. It is an error if, for any index i, locals[i]
+ * represents a local variable whose index is greater than the maximum number of
+ * local variables for the method. <br> <br> The 0th entry in stack represents
+ * the type of the bottom of the stack, and subsequent entries represent types
+ * of stack elements closer to the top of the operand stack. We shall refer to
+ * the bottom element of the stack as stack element 0, and to subsequent
+ * elements as stack element 1, 2 etc. If stack[M] represents stack element N,
+ * then stack[M+1] represents stack element N+1 if stack[M] is one of
+ * Top_variable_info, Integer_variable_info, Float_variable_info,
+ * Null_variable_info, UninitializedThis_variable_info, Object_variable_info, or
+ * Uninitialized_variable_info, otherwise stack[M+1] represents stack element
+ * N+2. It is an error if, for any index i, stack[i] represents a stack entry
+ * whose index is greater than the maximum operand stack size for the method.
+ * <br> <br> We say that an instruction in the byte code has a corresponding
+ * stack map frame if the offset in the offset field of the stack map frame is
+ * the same as the offset of the instruction in the byte codes. <br> <br> The
+ * verification_type_info structure consists of a one-byte tag followed by zero
+ * or more bytes, giving more information about the tag. Each
+ * verification_type_info structure specifies the verification type of one or
+ * two locations.
+ *
+ * <pre>
+ * union verification_type_info {
+ * Top_variable_info;
+ * Integer_variable_info;
+ * Float_variable_info;
+ * Long_variable_info;
+ * Double_variable_info;
+ * Null_variable_info;
+ * UninitializedThis_variable_info;
+ * Object_variable_info;
+ * Uninitialized_variable_info;
+ * }
+ * </pre>
+ *
+ * The Top_variable_info type indicates that the local variable has the
+ * verification type top (T.)
+ *
+ * <pre>
+ * Top_variable_info {
+ * u1 tag = ITEM_Top; // 0
+ * }
+ * </pre>
+ *
+ * The Integer_variable_info type indicates that the location contains the
+ * verification type int.
+ *
+ * <pre>
+ * Integer_variable_info {
+ * u1 tag = ITEM_Integer; // 1
+ * }
+ * </pre>
+ *
+ * The Float_variable_info type indicates that the location contains the
+ * verification type float.
+ *
+ * <pre>
+ * Float_variable_info {
+ * u1 tag = ITEM_Float; // 2
+ * }
+ * </pre>
+ *
+ * The Long_variable_info type indicates that the location contains the
+ * verification type long. If the location is a local variable, then:
+ *
+ * <ul> <li>It must not be the local variable with the highest index.</li>
+ * <li>The next higher numbered local variable contains the verification type
+ * T.</li> </ul>
+ *
+ * If the location is an operand stack entry, then:
+ *
+ * <ul> <li>The current location must not be the topmost location of the
+ * operand stack.</li> <li>the next location closer to the top of the operand
+ * stack contains the verification type T.</li> </ul>
+ *
+ * This structure gives the content...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-25 11:45:13
|
Revision: 3314
http://jnode.svn.sourceforge.net/jnode/?rev=3314&view=rev
Author: lsantha
Date: 2007-06-25 04:45:11 -0700 (Mon, 25 Jun 2007)
Log Message:
-----------
Openjdk integration.
Removed Paths:
-------------
trunk/core/src/classpath/org/org/ietf/
trunk/core/src/classpath/org/org/omg/
trunk/core/src/classpath/org/org/relaxng/
trunk/core/src/classpath/org/org/w3c/dom/Attr.java
trunk/core/src/classpath/org/org/w3c/dom/CDATASection.java
trunk/core/src/classpath/org/org/w3c/dom/CharacterData.java
trunk/core/src/classpath/org/org/w3c/dom/Comment.java
trunk/core/src/classpath/org/org/w3c/dom/DOMConfiguration.java
trunk/core/src/classpath/org/org/w3c/dom/DOMError.java
trunk/core/src/classpath/org/org/w3c/dom/DOMErrorHandler.java
trunk/core/src/classpath/org/org/w3c/dom/DOMException.java
trunk/core/src/classpath/org/org/w3c/dom/DOMImplementation.java
trunk/core/src/classpath/org/org/w3c/dom/DOMImplementationList.java
trunk/core/src/classpath/org/org/w3c/dom/DOMImplementationSource.java
trunk/core/src/classpath/org/org/w3c/dom/DOMLocator.java
trunk/core/src/classpath/org/org/w3c/dom/DOMStringList.java
trunk/core/src/classpath/org/org/w3c/dom/Document.java
trunk/core/src/classpath/org/org/w3c/dom/DocumentFragment.java
trunk/core/src/classpath/org/org/w3c/dom/DocumentType.java
trunk/core/src/classpath/org/org/w3c/dom/Element.java
trunk/core/src/classpath/org/org/w3c/dom/Entity.java
trunk/core/src/classpath/org/org/w3c/dom/EntityReference.java
trunk/core/src/classpath/org/org/w3c/dom/NameList.java
trunk/core/src/classpath/org/org/w3c/dom/NamedNodeMap.java
trunk/core/src/classpath/org/org/w3c/dom/Node.java
trunk/core/src/classpath/org/org/w3c/dom/NodeList.java
trunk/core/src/classpath/org/org/w3c/dom/Notation.java
trunk/core/src/classpath/org/org/w3c/dom/ProcessingInstruction.java
trunk/core/src/classpath/org/org/w3c/dom/Text.java
trunk/core/src/classpath/org/org/w3c/dom/TypeInfo.java
trunk/core/src/classpath/org/org/w3c/dom/UserDataHandler.java
trunk/core/src/classpath/org/org/w3c/dom/bootstrap/
trunk/core/src/classpath/org/org/w3c/dom/css/
trunk/core/src/classpath/org/org/w3c/dom/events/
trunk/core/src/classpath/org/org/w3c/dom/ls/
trunk/core/src/classpath/org/org/w3c/dom/ranges/
trunk/core/src/classpath/org/org/w3c/dom/stylesheets/
trunk/core/src/classpath/org/org/w3c/dom/traversal/
trunk/core/src/classpath/org/org/w3c/dom/views/
trunk/core/src/classpath/org/org/w3c/dom/xpath/
trunk/core/src/classpath/org/org/xml/
Deleted: trunk/core/src/classpath/org/org/w3c/dom/Attr.java
===================================================================
--- trunk/core/src/classpath/org/org/w3c/dom/Attr.java 2007-06-25 11:24:41 UTC (rev 3313)
+++ trunk/core/src/classpath/org/org/w3c/dom/Attr.java 2007-06-25 11:45:11 UTC (rev 3314)
@@ -1,275 +0,0 @@
-/*
- * Copyright (c) 2004 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] 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.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-package org.w3c.dom;
-
-/**
- * The <code>Attr</code> interface represents an attribute in an
- * <code>Element</code> object. Typically the allowable values for the
- * attribute are defined in a schema associated with the document.
- * <p><code>Attr</code> objects inherit the <code>Node</code> interface, but
- * since they are not actually child nodes of the element they describe, the
- * DOM does not consider them part of the document tree. Thus, the
- * <code>Node</code> attributes <code>parentNode</code>,
- * <code>previousSibling</code>, and <code>nextSibling</code> have a
- * <code>null</code> value for <code>Attr</code> objects. The DOM takes the
- * view that attributes are properties of elements rather than having a
- * separate identity from the elements they are associated with; this should
- * make it more efficient to implement such features as default attributes
- * associated with all elements of a given type. Furthermore,
- * <code>Attr</code> nodes may not be immediate children of a
- * <code>DocumentFragment</code>. However, they can be associated with
- * <code>Element</code> nodes contained within a
- * <code>DocumentFragment</code>. In short, users and implementors of the
- * DOM need to be aware that <code>Attr</code> nodes have some things in
- * common with other objects inheriting the <code>Node</code> interface, but
- * they also are quite distinct.
- * <p>The attribute's effective value is determined as follows: if this
- * attribute has been explicitly assigned any value, that value is the
- * attribute's effective value; otherwise, if there is a declaration for
- * this attribute, and that declaration includes a default value, then that
- * default value is the attribute's effective value; otherwise, the
- * attribute does not exist on this element in the structure model until it
- * has been explicitly added. Note that the <code>Node.nodeValue</code>
- * attribute on the <code>Attr</code> instance can also be used to retrieve
- * the string version of the attribute's value(s).
- * <p> If the attribute was not explicitly given a value in the instance
- * document but has a default value provided by the schema associated with
- * the document, an attribute node will be created with
- * <code>specified</code> set to <code>false</code>. Removing attribute
- * nodes for which a default value is defined in the schema generates a new
- * attribute node with the default value and <code>specified</code> set to
- * <code>false</code>. If validation occurred while invoking
- * <code>Document.normalizeDocument()</code>, attribute nodes with
- * <code>specified</code> equals to <code>false</code> are recomputed
- * according to the default attribute values provided by the schema. If no
- * default value is associate with this attribute in the schema, the
- * attribute node is discarded.
- * <p>In XML, where the value of an attribute can contain entity references,
- * the child nodes of the <code>Attr</code> node may be either
- * <code>Text</code> or <code>EntityReference</code> nodes (when these are
- * in use; see the description of <code>EntityReference</code> for
- * discussion).
- * <p>The DOM Core represents all attribute values as simple strings, even if
- * the DTD or schema associated with the document declares them of some
- * specific type such as tokenized.
- * <p>The way attribute value normalization is performed by the DOM
- * implementation depends on how much the implementation knows about the
- * schema in use. Typically, the <code>value</code> and
- * <code>nodeValue</code> attributes of an <code>Attr</code> node initially
- * returns the normalized value given by the parser. It is also the case
- * after <code>Document.normalizeDocument()</code> is called (assuming the
- * right options have been set). But this may not be the case after
- * mutation, independently of whether the mutation is performed by setting
- * the string value directly or by changing the <code>Attr</code> child
- * nodes. In particular, this is true when <a href='http://www.w3.org/TR/2004/REC-xml-20040204#dt-charref'>character
- * references</a> are involved, given that they are not represented in the DOM and they
- * impact attribute value normalization. On the other hand, if the
- * implementation knows about the schema in use when the attribute value is
- * changed, and it is of a different type than CDATA, it may normalize it
- * again at that time. This is especially true of specialized DOM
- * implementations, such as SVG DOM implementations, which store attribute
- * values in an internal form different from a string.
- * <p>The following table gives some examples of the relations between the
- * attribute value in the original document (parsed attribute), the value as
- * exposed in the DOM, and the serialization of the value:
- * <table border='1' cellpadding='3'>
- * <tr>
- * <th>Examples</th>
- * <th>Parsed
- * attribute value</th>
- * <th>Initial <code>Attr.value</code></th>
- * <th>Serialized attribute value</th>
- * </tr>
- * <tr>
- * <td valign='top' rowspan='1' colspan='1'>
- * Character reference</td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"x&#178;=5"</pre>
- * </td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"x\u00b2=5"</pre>
- * </td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"x&#178;=5"</pre>
- * </td>
- * </tr>
- * <tr>
- * <td valign='top' rowspan='1' colspan='1'>Built-in
- * character entity</td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"y&lt;6"</pre>
- * </td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"y<6"</pre>
- * </td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"y&lt;6"</pre>
- * </td>
- * </tr>
- * <tr>
- * <td valign='top' rowspan='1' colspan='1'>Literal newline between</td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>
- * "x=5&#10;y=6"</pre>
- * </td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"x=5 y=6"</pre>
- * </td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"x=5&#10;y=6"</pre>
- * </td>
- * </tr>
- * <tr>
- * <td valign='top' rowspan='1' colspan='1'>Normalized newline between</td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"x=5
- * y=6"</pre>
- * </td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"x=5 y=6"</pre>
- * </td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>"x=5 y=6"</pre>
- * </td>
- * </tr>
- * <tr>
- * <td valign='top' rowspan='1' colspan='1'>Entity <code>e</code> with literal newline</td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <pre>
- * <!ENTITY e '...&#10;...'> [...]> "x=5&e;y=6"</pre>
- * </td>
- * <td valign='top' rowspan='1' colspan='1'><em>Dependent on Implementation and Load Options</em></td>
- * <td valign='top' rowspan='1' colspan='1'><em>Dependent on Implementation and Load/Save Options</em></td>
- * </tr>
- * </table>
- * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface Attr extends Node {
- /**
- * Returns the name of this attribute. If <code>Node.localName</code> is
- * different from <code>null</code>, this attribute is a qualified name.
- */
- public String getName();
-
- /**
- * <code>True</code> if this attribute was explicitly given a value in
- * the instance document, <code>false</code> otherwise. If the
- * application changed the value of this attribute node (even if it ends
- * up having the same value as the default value) then it is set to
- * <code>true</code>. The implementation may handle attributes with
- * default values from other schemas similarly but applications should
- * use <code>Document.normalizeDocument()</code> to guarantee this
- * information is up-to-date.
- */
- public boolean getSpecified();
-
- /**
- * On retrieval, the value of the attribute is returned as a string.
- * Character and general entity references are replaced with their
- * values. See also the method <code>getAttribute</code> on the
- * <code>Element</code> interface.
- * <br>On setting, this creates a <code>Text</code> node with the unparsed
- * contents of the string, i.e. any characters that an XML processor
- * would recognize as markup are instead treated as literal text. See
- * also the method <code>Element.setAttribute()</code>.
- * <br> Some specialized implementations, such as some [<a href='http://www.w3.org/TR/2003/REC-SVG11-20030114/'>SVG 1.1</a>]
- * implementations, may do normalization automatically, even after
- * mutation; in such case, the value on retrieval may differ from the
- * value on setting.
- */
- public String getValue();
- /**
- * On retrieval, the value of the attribute is returned as a string.
- * Character and general entity references are replaced with their
- * values. See also the method <code>getAttribute</code> on the
- * <code>Element</code> interface.
- * <br>On setting, this creates a <code>Text</code> node with the unparsed
- * contents of the string, i.e. any characters that an XML processor
- * would recognize as markup are instead treated as literal text. See
- * also the method <code>Element.setAttribute()</code>.
- * <br> Some specialized implementations, such as some [<a href='http://www.w3.org/TR/2003/REC-SVG11-20030114/'>SVG 1.1</a>]
- * implementations, may do normalization automatically, even after
- * mutation; in such case, the value on retrieval may differ from the
- * value on setting.
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
- */
- public void setValue(String value)
- throws DOMException;
-
- /**
- * The <code>Element</code> node this attribute is attached to or
- * <code>null</code> if this attribute is not in use.
- * @since DOM Level 2
- */
- public Element getOwnerElement();
-
- /**
- * The type information associated with this attribute. While the type
- * information contained in this attribute is guarantee to be correct
- * after loading the document or invoking
- * <code>Document.normalizeDocument()</code>, <code>schemaTypeInfo</code>
- * may not be reliable if the node was moved.
- * @since DOM Level 3
- */
- public TypeInfo getSchemaTypeInfo();
-
- /**
- * Returns whether this attribute is known to be of type ID (i.e. to
- * contain an identifier for its owner element) or not. When it is and
- * its value is unique, the <code>ownerElement</code> of this attribute
- * can be retrieved using the method <code>Document.getElementById</code>
- * . The implementation could use several ways to determine if an
- * attribute node is known to contain an identifier:
- * <ul>
- * <li> If validation
- * occurred using an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
- * while loading the document or while invoking
- * <code>Document.normalizeDocument()</code>, the post-schema-validation
- * infoset contributions (PSVI contributions) values are used to
- * determine if this attribute is a schema-determined ID attribute using
- * the <a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/#term-sdi'>
- * schema-determined ID</a> definition in [<a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/'>XPointer</a>]
- * .
- * </li>
- * <li> If validation occurred using a DTD while loading the document or
- * while invoking <code>Document.normalizeDocument()</code>, the infoset <b>[type definition]</b> value is used to determine if this attribute is a DTD-determined ID
- * attribute using the <a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/#term-ddi'>
- * DTD-determined ID</a> definition in [<a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/'>XPointer</a>]
- * .
- * </li>
- * <li> from the use of the methods <code>Element.setIdAttribute()</code>,
- * <code>Element.setIdAttributeNS()</code>, or
- * <code>Element.setIdAttributeNode()</code>, i.e. it is an
- * user-determined ID attribute;
- * <p ><b>Note:</b> XPointer framework (see section 3.2 in [<a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/'>XPointer</a>]
- * ) consider the DOM user-determined ID attribute as being part of the
- * XPointer externally-determined ID definition.
- * </li>
- * <li> using mechanisms that
- * are outside the scope of this specification, it is then an
- * externally-determined ID attribute. This includes using schema
- * languages different from XML schema and DTD.
- * </li>
- * </ul>
- * <br> If validation occurred while invoking
- * <code>Document.normalizeDocument()</code>, all user-determined ID
- * attributes are reset and all attribute nodes ID information are then
- * reevaluated in accordance to the schema used. As a consequence, if
- * the <code>Attr.schemaTypeInfo</code> attribute contains an ID type,
- * <code>isId</code> will always return true.
- * @since DOM Level 3
- */
- public boolean isId();
-
-}
Deleted: trunk/core/src/classpath/org/org/w3c/dom/CDATASection.java
===================================================================
--- trunk/core/src/classpath/org/org/w3c/dom/CDATASection.java 2007-06-25 11:24:41 UTC (rev 3313)
+++ trunk/core/src/classpath/org/org/w3c/dom/CDATASection.java 2007-06-25 11:45:11 UTC (rev 3314)
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2004 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] 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.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-package org.w3c.dom;
-
-/**
- * CDATA sections are used to escape blocks of text containing characters that
- * would otherwise be regarded as markup. The only delimiter that is
- * recognized in a CDATA section is the "]]>" string that ends the CDATA
- * section. CDATA sections cannot be nested. Their primary purpose is for
- * including material such as XML fragments, without needing to escape all
- * the delimiters.
- * <p>The <code>CharacterData.data</code> attribute holds the text that is
- * contained by the CDATA section. Note that this <em>may</em> contain characters that need to be escaped outside of CDATA sections and
- * that, depending on the character encoding ("charset") chosen for
- * serialization, it may be impossible to write out some characters as part
- * of a CDATA section.
- * <p>The <code>CDATASection</code> interface inherits from the
- * <code>CharacterData</code> interface through the <code>Text</code>
- * interface. Adjacent <code>CDATASection</code> nodes are not merged by use
- * of the <code>normalize</code> method of the <code>Node</code> interface.
- * <p> No lexical check is done on the content of a CDATA section and it is
- * therefore possible to have the character sequence <code>"]]>"</code>
- * in the content, which is illegal in a CDATA section per section 2.7 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
- * presence of this character sequence must generate a fatal error during
- * serialization or the cdata section must be splitted before the
- * serialization (see also the parameter <code>"split-cdata-sections"</code>
- * in the <code>DOMConfiguration</code> interface).
- * <p ><b>Note:</b> Because no markup is recognized within a
- * <code>CDATASection</code>, character numeric references cannot be used as
- * an escape mechanism when serializing. Therefore, action needs to be taken
- * when serializing a <code>CDATASection</code> with a character encoding
- * where some of the contained characters cannot be represented. Failure to
- * do so would not produce well-formed XML.
- * <p ><b>Note:</b> One potential solution in the serialization process is to
- * end the CDATA section before the character, output the character using a
- * character reference or entity reference, and open a new CDATA section for
- * any further characters in the text node. Note, however, that some code
- * conversion libraries at the time of writing do not return an error or
- * exception when a character is missing from the encoding, making the task
- * of ensuring that data is not corrupted on serialization more difficult.
- * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface CDATASection extends Text {
-}
Deleted: trunk/core/src/classpath/org/org/w3c/dom/CharacterData.java
===================================================================
--- trunk/core/src/classpath/org/org/w3c/dom/CharacterData.java 2007-06-25 11:24:41 UTC (rev 3313)
+++ trunk/core/src/classpath/org/org/w3c/dom/CharacterData.java 2007-06-25 11:45:11 UTC (rev 3314)
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2004 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] 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.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-package org.w3c.dom;
-
-/**
- * The <code>CharacterData</code> interface extends Node with a set of
- * attributes and methods for accessing character data in the DOM. For
- * clarity this set is defined here rather than on each object that uses
- * these attributes and methods. No DOM objects correspond directly to
- * <code>CharacterData</code>, though <code>Text</code> and others do
- * inherit the interface from it. All <code>offsets</code> in this interface
- * start from <code>0</code>.
- * <p>As explained in the <code>DOMString</code> interface, text strings in
- * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units. In
- * the following, the term 16-bit units is used whenever necessary to
- * indicate that indexing on CharacterData is done in 16-bit units.
- * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface CharacterData extends Node {
- /**
- * The character data of the node that implements this interface. The DOM
- * implementation may not put arbitrary limits on the amount of data
- * that may be stored in a <code>CharacterData</code> node. However,
- * implementation limits may mean that the entirety of a node's data may
- * not fit into a single <code>DOMString</code>. In such cases, the user
- * may call <code>substringData</code> to retrieve the data in
- * appropriately sized pieces.
- * @exception DOMException
- * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
- * fit in a <code>DOMString</code> variable on the implementation
- * platform.
- */
- public String getData()
- throws DOMException;
- /**
- * The character data of the node that implements this interface. The DOM
- * implementation may not put arbitrary limits on the amount of data
- * that may be stored in a <code>CharacterData</code> node. However,
- * implementation limits may mean that the entirety of a node's data may
- * not fit into a single <code>DOMString</code>. In such cases, the user
- * may call <code>substringData</code> to retrieve the data in
- * appropriately sized pieces.
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
- */
- public void setData(String data)
- throws DOMException;
-
- /**
- * The number of 16-bit units that are available through <code>data</code>
- * and the <code>substringData</code> method below. This may have the
- * value zero, i.e., <code>CharacterData</code> nodes may be empty.
- */
- public int getLength();
-
- /**
- * Extracts a range of data from the node.
- * @param offset Start offset of substring to extract.
- * @param count The number of 16-bit units to extract.
- * @return The specified substring. If the sum of <code>offset</code> and
- * <code>count</code> exceeds the <code>length</code>, then all 16-bit
- * units to the end of the data are returned.
- * @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
- * negative or greater than the number of 16-bit units in
- * <code>data</code>, or if the specified <code>count</code> is
- * negative.
- * <br>DOMSTRING_SIZE_ERR: Raised if the specified range of text does
- * not fit into a <code>DOMString</code>.
- */
- public String substringData(int offset,
- int count)
- throws DOMException;
-
- /**
- * Append the string to the end of the character data of the node. Upon
- * success, <code>data</code> provides access to the concatenation of
- * <code>data</code> and the <code>DOMString</code> specified.
- * @param arg The <code>DOMString</code> to append.
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- */
- public void appendData(String arg)
- throws DOMException;
-
- /**
- * Insert a string at the specified 16-bit unit offset.
- * @param offset The character offset at which to insert.
- * @param arg The <code>DOMString</code> to insert.
- * @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
- * negative or greater than the number of 16-bit units in
- * <code>data</code>.
- * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- */
- public void insertData(int offset,
- String arg)
- throws DOMException;
-
- /**
- * Remove a range of 16-bit units from the node. Upon success,
- * <code>data</code> and <code>length</code> reflect the change.
- * @param offset The offset from which to start removing.
- * @param count The number of 16-bit units to delete. If the sum of
- * <code>offset</code> and <code>count</code> exceeds
- * <code>length</code> then all 16-bit units from <code>offset</code>
- * to the end of the data are deleted.
- * @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
- * negative or greater than the number of 16-bit units in
- * <code>data</code>, or if the specified <code>count</code> is
- * negative.
- * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- */
- public void deleteData(int offset,
- int count)
- throws DOMException;
-
- /**
- * Replace the characters starting at the specified 16-bit unit offset
- * with the specified string.
- * @param offset The offset from which to start replacing.
- * @param count The number of 16-bit units to replace. If the sum of
- * <code>offset</code> and <code>count</code> exceeds
- * <code>length</code>, then all 16-bit units to the end of the data
- * are replaced; (i.e., the effect is the same as a <code>remove</code>
- * method call with the same range, followed by an <code>append</code>
- * method invocation).
- * @param arg The <code>DOMString</code> with which the range must be
- * replaced.
- * @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
- * negative or greater than the number of 16-bit units in
- * <code>data</code>, or if the specified <code>count</code> is
- * negative.
- * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- */
- public void replaceData(int offset,
- int count,
- String arg)
- throws DOMException;
-
-}
Deleted: trunk/core/src/classpath/org/org/w3c/dom/Comment.java
===================================================================
--- trunk/core/src/classpath/org/org/w3c/dom/Comment.java 2007-06-25 11:24:41 UTC (rev 3313)
+++ trunk/core/src/classpath/org/org/w3c/dom/Comment.java 2007-06-25 11:45:11 UTC (rev 3314)
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2004 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] 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.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-package org.w3c.dom;
-
-/**
- * This interface inherits from <code>CharacterData</code> and represents the
- * content of a comment, i.e., all the characters between the starting '
- * <code><!--</code>' and ending '<code>--></code>'. Note that this is
- * the definition of a comment in XML, and, in practice, HTML, although some
- * HTML tools may implement the full SGML comment structure.
- * <p> No lexical check is done on the content of a comment and it is
- * therefore possible to have the character sequence <code>"--"</code>
- * (double-hyphen) in the content, which is illegal in a comment per section
- * 2.5 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
- * presence of this character sequence must generate a fatal error during
- * serialization.
- * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (D...
[truncated message content] |