Imported GNU Classpath 0.90
Imported GNU Classpath 0.90
* scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
* gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
* java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
* java/lang/Math.java: New override file.
* java/lang/Character.java: Merged from Classpath.
(start, end): Now 'int's.
(canonicalName): New field.
(CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
(UnicodeBlock): Added argument.
(of): New overload.
(forName): New method.
Updated unicode blocks.
(sets): Updated.
* sources.am: Regenerated.
* Makefile.in: Likewise.
From-SVN: r111942
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* DomCharacterData.java --
|
||||
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999,2000,2001,2004,2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
@@ -39,6 +39,8 @@ package gnu.xml.dom;
|
||||
|
||||
import org.w3c.dom.CharacterData;
|
||||
import org.w3c.dom.DOMException;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.w3c.dom.events.MutationEvent;
|
||||
|
||||
|
||||
@@ -55,6 +57,30 @@ public abstract class DomCharacterData
|
||||
implements CharacterData
|
||||
{
|
||||
|
||||
/**
|
||||
* Empty node list representing the children of character data nodes.
|
||||
*/
|
||||
static class EmptyNodeList
|
||||
implements NodeList
|
||||
{
|
||||
|
||||
public int getLength()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Node item(int index)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Singleton empty node list for character data nodes.
|
||||
*/
|
||||
static final NodeList CHILD_NODES = new EmptyNodeList();
|
||||
|
||||
private String text;
|
||||
|
||||
// package private
|
||||
@@ -279,6 +305,15 @@ public abstract class DomCharacterData
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an empty node list.
|
||||
* Character data nodes do not have children.
|
||||
*/
|
||||
public NodeList getChildNodes()
|
||||
{
|
||||
return CHILD_NODES;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base URI for character data is <code>null</code>.
|
||||
* @since DOM Level 3 Core
|
||||
|
||||
Reference in New Issue
Block a user