This commit is contained in:
Daniel D. Daugherty 2014-06-20 20:37:57 +00:00
commit fe70c75531
595 changed files with 12980 additions and 6577 deletions

View File

@ -260,3 +260,4 @@ efe7dbc6088691757404e0c8745f894e3ca9c022 jdk9-b09
74eb0778e4f2dbff6628e718378449fba27c4265 jdk9-b15
4a09f5d30be844ac6f714bdb0f63d8c3c08b9a98 jdk9-b16
410bccbded9e9cce80f1e13ad221e37ae97a3986 jdk9-b17
c5495e25c7258ab5f96a1ae14610887d76d2be63 jdk9-b18

View File

@ -260,3 +260,4 @@ ab55a18a95e1990a588929d5d29db3eb9985fea0 jdk9-b11
b114474fb25af4e73cb7219f7c04bd8994da03a5 jdk9-b15
cf22a728521f91a4692b433d39d730a0a1b23155 jdk9-b16
24152ee0ee1abef54a8bab04c099261dba7bcca5 jdk9-b17
65abab59f783fcf02ff8e133431c252f9e5f07d5 jdk9-b18

View File

@ -260,3 +260,4 @@ a2b82f863ba95a596da555a4c1b871c404863e7e jdk9-b14
e54022d0dd92106fff7f7fe670010cd7e6517ee3 jdk9-b15
422ef9d29d84f571453f015c4cb8713c3af70ee4 jdk9-b16
4c75c2ca7cf3e0618315879acf17f42c8fcd0c09 jdk9-b17
77565aaaa2bb814e94817e92d680168052a25395 jdk9-b18

View File

@ -420,3 +420,4 @@ bd333491bb6c012d7b606939406d0fa9a5ac7ffd jdk9-b14
170f6d733d7aec062f743a6b8c1cce940a7a984a jdk9-b15
b14e7c0b7d3ec04127f565cda1d84122e205680c jdk9-b16
14b656df31c2cb09c505921061e79977823de71a jdk9-b17
871fd128548480095e0dc3fc34c422666baeec75 jdk9-b18

View File

@ -34,7 +34,7 @@
#include "libproc_md.h"
#endif
#include <linux/ptrace.h>
#include <sys/ptrace.h>
/************************************************************************************

View File

@ -55,7 +55,7 @@ int VM_Version::platform_features(int features) {
if (detect_niagara()) {
NOT_PRODUCT(if (PrintMiscellaneous && Verbose) tty->print_cr("Detected Linux on Niagara");)
features = niagara1_m;
features = niagara1_m | T_family_m;
}
return features;

View File

@ -475,7 +475,7 @@ MethodLivenessResult MethodLiveness::get_liveness_at(int entry_bci) {
bci = 0;
}
MethodLivenessResult answer((uintptr_t*)NULL,0);
MethodLivenessResult answer((BitMap::bm_word_t*)NULL,0);
if (_block_count > 0) {
if (TimeLivenessAnalysis) _time_total.start();
@ -1000,7 +1000,7 @@ bool MethodLiveness::BasicBlock::merge_exception(BitMap other) {
}
MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) {
MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()),
MethodLivenessResult answer(NEW_RESOURCE_ARRAY(BitMap::bm_word_t, _analyzer->bit_map_size_words()),
_analyzer->bit_map_size_bits());
answer.set_is_valid();

View File

@ -127,7 +127,7 @@ bool CMBitMap::allocate(ReservedSpace heap_rs) {
}
assert(_virtual_space.committed_size() == brs.size(),
"didn't reserve backing store for all of concurrent marking bit map?");
_bm.set_map((uintptr_t*)_virtual_space.low());
_bm.set_map((BitMap::bm_word_t*)_virtual_space.low());
assert(_virtual_space.committed_size() << (_shifter + LogBitsPerByte) >=
_bmWordSize, "inconsistency in bit map sizing");
_bm.set_size(_bmWordSize >> _shifter);

View File

@ -433,14 +433,6 @@ HeapRegion* G1CollectedHeap::pop_dirty_cards_region()
return hr;
}
void G1CollectedHeap::stop_conc_gc_threads() {
_cg1r->stop();
_cmThread->stop();
if (G1StringDedup::is_enabled()) {
G1StringDedup::stop();
}
}
#ifdef ASSERT
// A region is added to the collection set as it is retired
// so an address p can point to a region which will be in the
@ -2174,20 +2166,14 @@ jint G1CollectedHeap::initialize() {
}
void G1CollectedHeap::stop() {
#if 0
// Stopping concurrent worker threads is currently disabled until
// some bugs in concurrent mark has been resolve. Without fixing
// those bugs first we risk haning during VM exit when trying to
// stop these threads.
// Abort any ongoing concurrent root region scanning and stop all
// concurrent threads. We do this to make sure these threads do
// not continue to execute and access resources (e.g. gclog_or_tty)
// Stop all concurrent threads. We do this to make sure these threads
// do not continue to execute and access resources (e.g. gclog_or_tty)
// that are destroyed during shutdown.
_cm->root_regions()->abort();
_cm->root_regions()->wait_until_scan_finished();
stop_conc_gc_threads();
#endif
_cg1r->stop();
_cmThread->stop();
if (G1StringDedup::is_enabled()) {
G1StringDedup::stop();
}
}
size_t G1CollectedHeap::conservative_max_heap_alignment() {

View File

@ -1684,8 +1684,6 @@ public:
void print_all_rsets() PRODUCT_RETURN;
public:
void stop_conc_gc_threads();
size_t pending_card_num();
size_t cards_scanned();

View File

@ -71,7 +71,7 @@ ParMarkBitMap::initialize(MemRegion covered_region)
if (_virtual_space != NULL && _virtual_space->expand_by(_reserved_byte_size)) {
_region_start = covered_region.start();
_region_size = covered_region.word_size();
idx_t* map = (idx_t*)_virtual_space->reserved_low_addr();
BitMap::bm_word_t* map = (BitMap::bm_word_t*)_virtual_space->reserved_low_addr();
_beg_bits.set_map(map);
_beg_bits.set_size(bits / 2);
_end_bits.set_map(map + words / 2);

View File

@ -2453,6 +2453,8 @@ bool Arguments::check_vm_args_consistency() {
warning("The VM option CICompilerCountPerCPU overrides CICompilerCount.");
}
status &= check_vm_args_consistency_ext();
return status;
}

View File

@ -462,6 +462,7 @@ class Arguments : AllStatic {
static void check_deprecated_gc_flags();
// Check consistency or otherwise of VM argument settings
static bool check_vm_args_consistency();
static bool check_vm_args_consistency_ext();
// Check stack pages settings
static bool check_stack_pages();
// Used by os_solaris

View File

@ -0,0 +1,30 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed 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. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "runtime/arguments.hpp"
bool Arguments::check_vm_args_consistency_ext() {
return true;
}

View File

@ -501,9 +501,6 @@ void before_exit(JavaThread * thread) {
os::infinite_sleep();
}
// Stop any ongoing concurrent GC work
Universe::heap()->stop();
// Terminate watcher thread - must before disenrolling any periodic task
if (PeriodicTask::num_tasks() > 0)
WatcherThread::stop();
@ -518,10 +515,8 @@ void before_exit(JavaThread * thread) {
StatSampler::disengage();
StatSampler::destroy();
// We do not need to explicitly stop concurrent GC threads because the
// JVM will be taken down at a safepoint when such threads are inactive --
// except for some concurrent G1 threads, see (comment in)
// Threads::destroy_vm().
// Stop concurrent GC threads
Universe::heap()->stop();
// Print GC/heap related information.
if (PrintGCDetails) {

View File

@ -3933,14 +3933,8 @@ bool Threads::destroy_vm() {
// GC vm_operations can get caught at the safepoint, and the
// heap is unparseable if they are caught. Grab the Heap_lock
// to prevent this. The GC vm_operations will not be able to
// queue until after the vm thread is dead.
// After this point, we'll never emerge out of the safepoint before
// the VM exits, so concurrent GC threads do not need to be explicitly
// stopped; they remain inactive until the process exits.
// Note: some concurrent G1 threads may be running during a safepoint,
// but these will not be accessing the heap, just some G1-specific side
// data structures that are not accessed by any other threads but them
// after this point in a terminal safepoint.
// queue until after the vm thread is dead. After this point,
// we'll never emerge out of the safepoint before the VM exits.
MutexLocker ml(Heap_lock);

View File

@ -25,7 +25,7 @@
* @test BooleanTest
* @bug 8028756
* @library /testlibrary /testlibrary/whitebox
* @build BooleanTest
* @build BooleanTest ClassFileInstaller sun.hotspot.WhiteBox com.oracle.java.testlibrary.*
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI BooleanTest
* @summary testing of WB::set/getBooleanVMFlag()

View File

@ -260,3 +260,4 @@ e88cecf5a21b760ff7d7761c2db6bb8c82bc9f0c jdk9-b12
6bad71866c7598587860e0981b0b0e51ec8c0476 jdk9-b15
a1461221b05d4620e4d7d1907e2a0282aaedf31c jdk9-b16
6f923fcbe5129eceb9617a9a18dbdd743980e785 jdk9-b17
5afa90c28742d175431be75f9098745510bd2b30 jdk9-b18

View File

@ -3,9 +3,11 @@
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@ -32,7 +34,6 @@ import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Vector;
import javax.xml.transform.Templates;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
@ -51,6 +52,7 @@ import com.sun.org.apache.xalan.internal.xsltc.dom.KeyIndex;
import com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory;
import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
import com.sun.org.apache.xml.internal.serializer.ToStream;
/**
* @author Jacek Ambroziak
@ -74,7 +76,7 @@ public abstract class AbstractTranslet implements Translet {
public String _doctypeSystem = null;
public boolean _indent = false;
public String _mediaType = null;
public Vector _cdata = null;
public ArrayList<String> _cdata = null;
public int _indentamount = -1;
public static final int FIRST_TRANSLET_VERSION = 100;
@ -642,7 +644,7 @@ public abstract class AbstractTranslet implements Translet {
*/
public void addCdataElement(String name) {
if (_cdata == null) {
_cdata = new Vector();
_cdata = new ArrayList<>();
}
int lastColon = name.lastIndexOf(':');
@ -650,11 +652,11 @@ public abstract class AbstractTranslet implements Translet {
if (lastColon > 0) {
String uri = name.substring(0, lastColon);
String localName = name.substring(lastColon+1);
_cdata.addElement(uri);
_cdata.addElement(localName);
_cdata.add(uri);
_cdata.add(localName);
} else {
_cdata.addElement(null);
_cdata.addElement(name);
_cdata.add(null);
_cdata.add(name);
}
}

View File

@ -3,9 +3,11 @@
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@ -40,7 +42,7 @@ import java.net.UnknownServiceException;
import java.util.Enumeration;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.Vector;
import java.util.ArrayList;
import java.lang.reflect.Constructor;
import javax.xml.parsers.DocumentBuilder;
@ -1084,7 +1086,7 @@ public final class TransformerImpl extends Transformer
else if (name.equals(OutputKeys.CDATA_SECTION_ELEMENTS)) {
if (value != null) {
StringTokenizer e = new StringTokenizer(value);
Vector uriAndLocalNames = null;
ArrayList<String> uriAndLocalNames = null;
while (e.hasMoreTokens()) {
final String token = e.nextToken();
@ -1104,11 +1106,11 @@ public final class TransformerImpl extends Transformer
}
if (uriAndLocalNames == null) {
uriAndLocalNames = new Vector();
uriAndLocalNames = new ArrayList<>();
}
// add the uri/localName as a pair, in that order
uriAndLocalNames.addElement(uri);
uriAndLocalNames.addElement(localName);
uriAndLocalNames.add(uri);
uriAndLocalNames.add(localName);
}
handler.setCdataSectionElements(uriAndLocalNames);
}

View File

@ -347,7 +347,7 @@ implements EntityReference {
* @see DocumentTypeImpl
* @see EntityImpl
*/
// The Xerces parser invokes callbacks for startEnityReference
// The Xerces parser invokes callbacks for startEntityReference
// the parsed value of the entity EACH TIME, so it is actually
// easier to create the nodes through the callbacks rather than
// clone the Entity.

View File

@ -585,7 +585,7 @@ implements XMLDTDScanner, XMLComponent, XMLEntityHandler {
boolean reportEntity = fReportEntity;
if (name.startsWith("%")) {
reportEntity = peekReportEntity();
// check well-formedness of the enity
// check well-formedness of the entity
int startMarkUpDepth = popPEStack();
// throw fatalError if this entity was incomplete and
// was a freestanding decl

View File

@ -2728,7 +2728,7 @@ public class XMLDocumentFragmentScannerImpl
//if the last section was character data
if(fLastSectionWasCharacterData){
//if we dont encounter any CDATA or ENITY REFERENCE and current state is also not SCANNER_STATE_CHARACTER_DATA
//if we dont encounter any CDATA or ENTITY REFERENCE and current state is also not SCANNER_STATE_CHARACTER_DATA
//return the last scanned charactrer data.
if((fScannerState != SCANNER_STATE_CDATA) && (fScannerState != SCANNER_STATE_REFERENCE)
&& (fScannerState != SCANNER_STATE_CHARACTER_DATA)){

View File

@ -1218,7 +1218,7 @@ public class XMLDTDValidator
// references appear in the document.
// REVISIT: this can be combined to a single check in
// startEntity if we add one more argument in
// startEnity, inAttrValue
// startEntity, inAttrValue
String nonNormalizedValue = attributes.getNonNormalizedValue(i);
if (nonNormalizedValue != null) {
String entityName = getExternalEntityRefInAttrValue(nonNormalizedValue);

View File

@ -559,11 +559,13 @@ final class ElementSchemePointer implements XPointerPart {
* @param token The token string
*/
private void addToken(String tokenStr) {
if (!fTokenNames.containsValue(tokenStr)) {
Integer tokenInt = new Integer(fTokenNames.size());
String str = fTokenNames.get(tokenStr);
Integer tokenInt = str == null ? null : Integer.parseInt(str);
if (tokenInt == null) {
tokenInt = new Integer(fTokenNames.size());
fTokenNames.put(tokenInt, tokenStr);
addToken(tokenInt.intValue());
}
addToken(tokenInt.intValue());
}
/**

View File

@ -524,11 +524,13 @@ public final class XPointerHandler extends XIncludeHandler implements
* @param token The token string
*/
private void addToken(String tokenStr) {
if (!fTokenNames.containsValue(tokenStr)) {
Integer tokenInt = new Integer(fTokenNames.size());
String str = fTokenNames.get(tokenStr);
Integer tokenInt = str == null ? null : Integer.parseInt(str);
if (tokenInt == null) {
tokenInt = new Integer(fTokenNames.size());
fTokenNames.put(tokenInt, tokenStr);
addToken(tokenInt.intValue());
}
addToken(tokenInt.intValue());
}
/**
@ -1251,4 +1253,4 @@ public final class XPointerHandler extends XIncludeHandler implements
super.setProperty(propertyId, value);
}
}
}

View File

@ -32,7 +32,7 @@ public class DTMConfigurationException extends DTMException {
/**
* Create a new <code>DTMConfigurationException</code> with no
* detail mesage.
* detail message.
*/
public DTMConfigurationException() {
super("Configuration Error");

View File

@ -3,9 +3,11 @@
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@ -27,7 +29,7 @@ import java.io.OutputStream;
import java.io.Writer;
import java.util.Hashtable;
import java.util.Properties;
import java.util.Vector;
import java.util.ArrayList;
import javax.xml.transform.SourceLocator;
import javax.xml.transform.Transformer;
@ -150,9 +152,9 @@ public class EmptySerializer implements SerializationHandler
couldThrowIOException();
}
/**
* @see SerializationHandler#setCdataSectionElements(java.util.Vector)
* @see SerializationHandler#setCdataSectionElements(java.util.ArrayList<String>)
*/
public void setCdataSectionElements(Vector URI_and_localNames)
public void setCdataSectionElements(ArrayList<String> URI_and_localNames)
{
aMethodIsCalled();
}
@ -763,4 +765,25 @@ public class EmptySerializer implements SerializationHandler
aMethodIsCalled();
}
public String getOutputProperty(String name) {
aMethodIsCalled();
return null;
}
public String getOutputPropertyDefault(String name) {
aMethodIsCalled();
return null;
}
public void setOutputProperty(String name, String val) {
aMethodIsCalled();
}
public void setOutputPropertyDefault(String name, String val) {
aMethodIsCalled();
}
}

View File

@ -3,9 +3,11 @@
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@ -23,8 +25,11 @@
package com.sun.org.apache.xml.internal.serializer;
import java.io.IOException;
import java.util.Vector;
import java.util.HashMap;
import java.util.Set;
import java.util.ArrayList;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.SourceLocator;
import javax.xml.transform.Transformer;
@ -108,12 +113,12 @@ public abstract class SerializerBase
/**
* The System ID for the doc type.
*/
private String m_doctypeSystem;
protected String m_doctypeSystem;
/**
* The public ID for the doc type.
*/
private String m_doctypePublic;
protected String m_doctypePublic;
/**
* Flag to tell that we need to add the doctype decl, which we can't do
@ -121,16 +126,10 @@ public abstract class SerializerBase
*/
boolean m_needToOutputDocTypeDecl = true;
/**
* The character encoding. Must match the encoding used for the
* printWriter.
*/
private String m_encoding = null;
/**
* Tells if we should write the XML declaration.
*/
private boolean m_shouldNotWriteXMLHeader = false;
protected boolean m_shouldNotWriteXMLHeader = false;
/**
* The standalone value for the doctype.
@ -159,12 +158,12 @@ public abstract class SerializerBase
/**
* Tells the XML version, for writing out to the XML decl.
*/
private String m_version = null;
protected String m_version = null;
/**
* The mediatype. Not used right now.
*/
private String m_mediatype;
protected String m_mediatype;
/**
* The transformer that was around when this output handler was created (if
@ -172,13 +171,6 @@ public abstract class SerializerBase
*/
private Transformer m_transformer;
/**
* Pairs of local names and corresponding URIs of CDATA sections. This list
* comes from the cdata-section-elements attribute. Every second one is a
* local name, and every other second one is the URI for the local name.
*/
protected Vector m_cdataSectionElements = null;
/**
* Namespace support, that keeps track of currently defined
* prefix/uri mappings. As processed elements come and go, so do
@ -538,16 +530,16 @@ public abstract class SerializerBase
*/
public String getEncoding()
{
return m_encoding;
return getOutputProperty(OutputKeys.ENCODING);
}
/**
* Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
* @param m_encoding the character encoding
*/
public void setEncoding(String m_encoding)
public void setEncoding(String encoding)
{
this.m_encoding = m_encoding;
setOutputProperty(OutputKeys.ENCODING,encoding);
}
/**
@ -557,7 +549,8 @@ public abstract class SerializerBase
*/
public void setOmitXMLDeclaration(boolean b)
{
this.m_shouldNotWriteXMLHeader = b;
String val = b ? "yes":"no";
setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,val);
}
@ -588,7 +581,7 @@ public abstract class SerializerBase
*/
public void setDoctypePublic(String doctypePublic)
{
this.m_doctypePublic = doctypePublic;
setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, doctypePublic);
}
@ -610,7 +603,7 @@ public abstract class SerializerBase
*/
public void setDoctypeSystem(String doctypeSystem)
{
this.m_doctypeSystem = doctypeSystem;
setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doctypeSystem);
}
/** Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
@ -621,8 +614,8 @@ public abstract class SerializerBase
*/
public void setDoctype(String doctypeSystem, String doctypePublic)
{
this.m_doctypeSystem = doctypeSystem;
this.m_doctypePublic = doctypePublic;
setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doctypeSystem);
setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, doctypePublic);
}
/**
@ -634,12 +627,9 @@ public abstract class SerializerBase
*/
public void setStandalone(String standalone)
{
if (standalone != null)
{
m_standaloneWasSpecified = true;
setStandaloneInternal(standalone);
}
setOutputProperty(OutputKeys.STANDALONE, standalone);
}
/**
* Sets the XSL standalone attribute, but does not remember if this is a
* default or explicite setting.
@ -700,7 +690,7 @@ public abstract class SerializerBase
*/
public void setVersion(String version)
{
m_version = version;
setOutputProperty(OutputKeys.VERSION, version);
}
/**
@ -712,7 +702,7 @@ public abstract class SerializerBase
*/
public void setMediaType(String mediaType)
{
m_mediatype = mediaType;
setOutputProperty(OutputKeys.MEDIA_TYPE,mediaType);
}
/**
@ -741,7 +731,8 @@ public abstract class SerializerBase
*/
public void setIndent(boolean doIndent)
{
m_doIndent = doIndent;
String val = doIndent ? "yes":"no";
setOutputProperty(OutputKeys.INDENT,val);
}
/**
@ -786,59 +777,6 @@ public abstract class SerializerBase
return this;
}
/**
* Push a boolean state based on if the name of the current element
* is found in the list of qnames. A state is only pushed if
* there were some cdata-section-names were specified.
* <p>
* Hidden parameters are the vector of qualified elements specified in
* cdata-section-names attribute, and the m_cdataSectionStates stack
* onto which whether the current element is in the list is pushed (true or
* false). Other hidden parameters are the current elements namespaceURI,
* localName and qName
*/
protected boolean isCdataSection()
{
boolean b = false;
if (null != m_cdataSectionElements)
{
if (m_elemContext.m_elementLocalName == null)
m_elemContext.m_elementLocalName =
getLocalName(m_elemContext.m_elementName);
if (m_elemContext.m_elementURI == null)
{
String prefix = getPrefixPart(m_elemContext.m_elementName);
if (prefix != null)
m_elemContext.m_elementURI =
m_prefixMap.lookupNamespace(prefix);
}
if ((null != m_elemContext.m_elementURI)
&& m_elemContext.m_elementURI.length() == 0)
m_elemContext.m_elementURI = null;
int nElems = m_cdataSectionElements.size();
// loop through 2 at a time, as these are pairs of URI and localName
for (int i = 0; i < nElems; i += 2)
{
String uri = (String) m_cdataSectionElements.elementAt(i);
String loc = (String) m_cdataSectionElements.elementAt(i + 1);
if (loc.equals(m_elemContext.m_elementLocalName)
&& subPartMatch(m_elemContext.m_elementURI, uri))
{
b = true;
break;
}
}
}
return b;
}
/**
* Tell if two strings are equal, without worry if the first string is null.
*
@ -1312,12 +1250,11 @@ public abstract class SerializerBase
private void resetSerializerBase()
{
this.m_attributes.clear();
this.m_cdataSectionElements = null;
this.m_StringOfCDATASections = null;
this.m_elemContext = new ElemContext();
this.m_doctypePublic = null;
this.m_doctypeSystem = null;
this.m_doIndent = false;
this.m_encoding = null;
this.m_indentAmount = 0;
this.m_inEntityRef = false;
this.m_inExternalDTD = false;
@ -1399,4 +1336,333 @@ public abstract class SerializerBase
// A particular sub-class of SerializerBase provides the implementation (if desired)
}
/**
* The CDATA section names stored in a whitespace separateed list with
* each element being a word of the form "{uri}localName" This list
* comes from the cdata-section-elements attribute.
*
* This field replaces m_cdataSectionElements Vector.
*/
protected String m_StringOfCDATASections = null;
boolean m_docIsEmpty = true;
void initCdataElems(String s)
{
if (s != null)
{
int max = s.length();
// true if we are in the middle of a pair of curly braces that delimit a URI
boolean inCurly = false;
// true if we found a URI but haven't yet processed the local name
boolean foundURI = false;
StringBuilder buf = new StringBuilder();
String uri = null;
String localName = null;
// parse through string, breaking on whitespaces. I do this instead
// of a tokenizer so I can track whitespace inside of curly brackets,
// which theoretically shouldn't happen if they contain legal URLs.
for (int i = 0; i < max; i++)
{
char c = s.charAt(i);
if (Character.isWhitespace(c))
{
if (!inCurly)
{
if (buf.length() > 0)
{
localName = buf.toString();
if (!foundURI)
uri = "";
addCDATAElement(uri,localName);
buf.setLength(0);
foundURI = false;
}
continue;
}
else
buf.append(c); // add whitespace to the URI
}
else if ('{' == c) // starting a URI
inCurly = true;
else if ('}' == c)
{
// we just ended a URI
foundURI = true;
uri = buf.toString();
buf.setLength(0);
inCurly = false;
}
else
{
// append non-whitespace, non-curly to current URI or localName being gathered.
buf.append(c);
}
}
if (buf.length() > 0)
{
// We have one last localName to process.
localName = buf.toString();
if (!foundURI)
uri = "";
addCDATAElement(uri,localName);
}
}
}
protected java.util.HashMap<String, HashMap<String, String>> m_CdataElems = null;
private void addCDATAElement(String uri, String localName)
{
if (m_CdataElems == null) {
m_CdataElems = new java.util.HashMap<>();
}
HashMap<String,String> h = m_CdataElems.get(localName);
if (h == null) {
h = new HashMap<>();
m_CdataElems.put(localName,h);
}
h.put(uri,uri);
}
/**
* Return true if nothing has been sent to this result tree yet.
* <p>
* This is not a public API.
*
* @xsl.usage internal
*/
public boolean documentIsEmpty() {
// If we haven't called startDocument() yet, then this document is empty
return m_docIsEmpty && (m_elemContext.m_currentElemDepth == 0);
}
/**
* Return true if the current element in m_elemContext
* is a CDATA section.
* CDATA sections are specified in the <xsl:output> attribute
* cdata-section-names or in the JAXP equivalent property.
* In any case the format of the value of such a property is:
* <pre>
* "{uri1}localName1 {uri2}localName2 . . . "
* </pre>
*
* <p>
* This method is not a public API, but is only used internally by the serializer.
*/
protected boolean isCdataSection() {
boolean b = false;
if (null != m_StringOfCDATASections) {
if (m_elemContext.m_elementLocalName == null) {
String localName = getLocalName(m_elemContext.m_elementName);
m_elemContext.m_elementLocalName = localName;
}
if ( m_elemContext.m_elementURI == null) {
m_elemContext.m_elementURI = getElementURI();
}
else if ( m_elemContext.m_elementURI.length() == 0) {
if ( m_elemContext.m_elementName == null) {
m_elemContext.m_elementName = m_elemContext.m_elementLocalName;
// leave URI as "", meaning in no namespace
}
else if (m_elemContext.m_elementLocalName.length() < m_elemContext.m_elementName.length()){
// We were told the URI was "", yet the name has a prefix since the name is longer than the localname.
// So we will fix that incorrect information here.
m_elemContext.m_elementURI = getElementURI();
}
}
HashMap<String, String> h = null;
if (m_CdataElems != null) {
h = m_CdataElems.get(m_elemContext.m_elementLocalName);
}
if (h != null) {
Object obj = h.get(m_elemContext.m_elementURI);
if (obj != null)
b = true;
}
}
return b;
}
/**
* Before this call m_elementContext.m_elementURI is null,
* which means it is not yet known. After this call it
* is non-null, but possibly "" meaning that it is in the
* default namespace.
*
* @return The URI of the element, never null, but possibly "".
*/
private String getElementURI() {
String uri = null;
// At this point in processing we have received all the
// namespace mappings
// As we still don't know the elements namespace,
// we now figure it out.
String prefix = getPrefixPart(m_elemContext.m_elementName);
if (prefix == null) {
// no prefix so lookup the URI of the default namespace
uri = m_prefixMap.lookupNamespace("");
} else {
uri = m_prefixMap.lookupNamespace(prefix);
}
if (uri == null) {
// We didn't find the namespace for the
// prefix ... ouch, that shouldn't happen.
// This is a hack, we really don't know
// the namespace
uri = EMPTYSTRING;
}
return uri;
}
/**
* Get the value of an output property,
* the explicit value, if any, otherwise the
* default value, if any, otherwise null.
*/
public String getOutputProperty(String name) {
String val = getOutputPropertyNonDefault(name);
// If no explicit value, try to get the default value
if (val == null)
val = getOutputPropertyDefault(name);
return val;
}
/**
* Get the value of an output property,
* not the default value. If there is a default
* value, but no non-default value this method
* will return null.
* <p>
*
*/
public String getOutputPropertyNonDefault(String name) {
return getProp(name,false);
}
/**
* Get the default value of an xsl:output property,
* which would be null only if no default value exists
* for the property.
*/
public String getOutputPropertyDefault(String name) {
return getProp(name, true);
}
/**
* Set the value for the output property, typically from
* an xsl:output element, but this does not change what
* the default value is.
*/
public void setOutputProperty(String name, String val) {
setProp(name,val,false);
}
/**
* Set the default value for an output property, but this does
* not impact any explicitly set value.
*/
public void setOutputPropertyDefault(String name, String val) {
setProp(name,val,true);
}
/**
* A mapping of keys to explicitly set values, for example if
* and <xsl:output/> has an "encoding" attribute, this
* map will have what that attribute maps to.
*/
private HashMap<String, String> m_OutputProps;
/**
* A mapping of keys to default values, for example if
* the default value of the encoding is "UTF-8" then this
* map will have that "encoding" maps to "UTF-8".
*/
private HashMap<String, String> m_OutputPropsDefault;
Set<String> getOutputPropDefaultKeys() {
return m_OutputPropsDefault.keySet();
}
Set<String> getOutputPropKeys() {
return m_OutputProps.keySet();
}
private String getProp(String name, boolean defaultVal) {
if (m_OutputProps == null) {
m_OutputProps = new HashMap<>();
m_OutputPropsDefault = new HashMap<>();
}
String val;
if (defaultVal)
val = m_OutputPropsDefault.get(name);
else
val = m_OutputProps.get(name);
return val;
}
/**
*
* @param name The name of the property, e.g. "{http://myprop}indent-tabs" or "indent".
* @param val The value of the property, e.g. "4"
* @param defaultVal true if this is a default value being set for the property as
* opposed to a user define on, set say explicitly in the stylesheet or via JAXP
*/
void setProp(String name, String val, boolean defaultVal) {
if (m_OutputProps == null) {
m_OutputProps = new HashMap<>();
m_OutputPropsDefault = new HashMap<>();
}
if (defaultVal)
m_OutputPropsDefault.put(name,val);
else {
if (OutputKeys.CDATA_SECTION_ELEMENTS.equals(name) && val != null) {
initCdataElems(val);
String oldVal = m_OutputProps.get(name);
String newVal;
if (oldVal == null)
newVal = oldVal + ' ' + val;
else
newVal = val;
m_OutputProps.put(name,newVal);
}
else {
m_OutputProps.put(name,val);
}
}
}
/**
* Get the first char of the local name
* @param name Either a local name, or a local name
* preceeded by a uri enclosed in curly braces.
*/
static char getFirstCharLocName(String name) {
final char first;
int i = name.indexOf('}');
if (i < 0)
first = name.charAt(0);
else
first = name.charAt(i+1);
return first;
}
}

View File

@ -3,9 +3,11 @@
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@ -349,84 +351,84 @@ public final class ToHTMLStream extends ToStream
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("A");
elemDesc = (ElemDesc) m_elementFlags.get("a");
elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
elemDesc.setAttr("NAME", ElemDesc.ATTRURL);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("AREA");
elemDesc = (ElemDesc) m_elementFlags.get("area");
elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
elemDesc.setAttr("NOHREF", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("BASE");
elemDesc = (ElemDesc) m_elementFlags.get("base");
elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("BUTTON");
elemDesc = (ElemDesc) m_elementFlags.get("button");
elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("BLOCKQUOTE");
elemDesc = (ElemDesc) m_elementFlags.get("blockquote");
elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("DEL");
elemDesc = (ElemDesc) m_elementFlags.get("del");
elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("DIR");
elemDesc = (ElemDesc) m_elementFlags.get("dir");
elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("DIV");
elemDesc = (ElemDesc) m_elementFlags.get("div");
elemDesc.setAttr("SRC", ElemDesc.ATTRURL); // Netscape 4 extension
elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // Internet-Explorer extension
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("DL");
elemDesc = (ElemDesc) m_elementFlags.get("dl");
elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("FORM");
elemDesc = (ElemDesc) m_elementFlags.get("form");
elemDesc.setAttr("ACTION", ElemDesc.ATTRURL);
// ----------------------------------------------
// Attribution to: "Voytenko, Dimitry" <DVoytenko@SECTORBASE.COM>
elemDesc = (ElemDesc) m_elementFlags.get("FRAME");
elemDesc = (ElemDesc) m_elementFlags.get("frame");
elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL);
elemDesc.setAttr("NORESIZE",ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("HEAD");
elemDesc = (ElemDesc) m_elementFlags.get("head");
elemDesc.setAttr("PROFILE", ElemDesc.ATTRURL);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("HR");
elemDesc = (ElemDesc) m_elementFlags.get("hr");
elemDesc.setAttr("NOSHADE", ElemDesc.ATTREMPTY);
// ----------------------------------------------
// HTML 4.0, section 16.5
elemDesc = (ElemDesc) m_elementFlags.get("IFRAME");
elemDesc = (ElemDesc) m_elementFlags.get("iframe");
elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL);
// ----------------------------------------------
// Netscape 4 extension
elemDesc = (ElemDesc) m_elementFlags.get("ILAYER");
elemDesc = (ElemDesc) m_elementFlags.get("ilayer");
elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("IMG");
elemDesc = (ElemDesc) m_elementFlags.get("img");
elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL);
elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL);
elemDesc.setAttr("ISMAP", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("INPUT");
elemDesc = (ElemDesc) m_elementFlags.get("input");
elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL);
elemDesc.setAttr("CHECKED", ElemDesc.ATTREMPTY);
@ -435,24 +437,24 @@ public final class ToHTMLStream extends ToStream
elemDesc.setAttr("READONLY", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("INS");
elemDesc = (ElemDesc) m_elementFlags.get("ins");
elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
// ----------------------------------------------
// Netscape 4 extension
elemDesc = (ElemDesc) m_elementFlags.get("LAYER");
elemDesc = (ElemDesc) m_elementFlags.get("layer");
elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("LINK");
elemDesc = (ElemDesc) m_elementFlags.get("link");
elemDesc.setAttr("HREF", ElemDesc.ATTRURL);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("MENU");
elemDesc = (ElemDesc) m_elementFlags.get("menu");
elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("OBJECT");
elemDesc = (ElemDesc) m_elementFlags.get("object");
elemDesc.setAttr("CLASSID", ElemDesc.ATTRURL);
elemDesc.setAttr("CODEBASE", ElemDesc.ATTRURL);
elemDesc.setAttr("DATA", ElemDesc.ATTRURL);
@ -461,58 +463,58 @@ public final class ToHTMLStream extends ToStream
elemDesc.setAttr("DECLARE", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("OL");
elemDesc = (ElemDesc) m_elementFlags.get("ol");
elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("OPTGROUP");
elemDesc = (ElemDesc) m_elementFlags.get("optgroup");
elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("OPTION");
elemDesc = (ElemDesc) m_elementFlags.get("option");
elemDesc.setAttr("SELECTED", ElemDesc.ATTREMPTY);
elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("Q");
elemDesc = (ElemDesc) m_elementFlags.get("q");
elemDesc.setAttr("CITE", ElemDesc.ATTRURL);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("SCRIPT");
elemDesc = (ElemDesc) m_elementFlags.get("script");
elemDesc.setAttr("SRC", ElemDesc.ATTRURL);
elemDesc.setAttr("FOR", ElemDesc.ATTRURL);
elemDesc.setAttr("DEFER", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("SELECT");
elemDesc = (ElemDesc) m_elementFlags.get("select");
elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
elemDesc.setAttr("MULTIPLE", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("TABLE");
elemDesc = (ElemDesc) m_elementFlags.get("table");
elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // Internet-Explorer extension
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("TD");
elemDesc = (ElemDesc) m_elementFlags.get("td");
elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("TEXTAREA");
elemDesc = (ElemDesc) m_elementFlags.get("textarea");
elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY);
elemDesc.setAttr("READONLY", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("TH");
elemDesc = (ElemDesc) m_elementFlags.get("th");
elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY);
// ----------------------------------------------
// The nowrap attribute of a tr element is both
// a Netscape and Internet-Explorer extension
elemDesc = (ElemDesc) m_elementFlags.get("TR");
elemDesc = (ElemDesc) m_elementFlags.get("tr");
elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY);
// ----------------------------------------------
elemDesc = (ElemDesc) m_elementFlags.get("UL");
elemDesc = (ElemDesc) m_elementFlags.get("ul");
elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY);
}
@ -1762,7 +1764,7 @@ public final class ToHTMLStream extends ToStream
* lets determine if the current element is specified in the cdata-
* section-elements list.
*/
if (m_cdataSectionElements != null)
if (m_StringOfCDATASections != null)
m_elemContext.m_isCdataSection = isCdataSection();
if (m_doIndent)
{
@ -1776,54 +1778,7 @@ public final class ToHTMLStream extends ToStream
throw new SAXException(e);
}
}
/**
* Initialize the serializer with the specified output stream and output
* format. Must be called before calling any of the serialize methods.
*
* @param output The output stream to use
* @param format The output format
* @throws UnsupportedEncodingException The encoding specified in the
* output format is not supported
*/
protected synchronized void init(OutputStream output, Properties format)
throws UnsupportedEncodingException
{
if (null == format)
{
format = OutputPropertiesFactory.getDefaultMethodProperties(Method.HTML);
}
super.init(output,format, false);
}
/**
* Specifies an output stream to which the document should be
* serialized. This method should not be called while the
* serializer is in the process of serializing a document.
* <p>
* The encoding specified in the output properties is used, or
* if no encoding was specified, the default for the selected
* output method.
*
* @param output The output stream
*/
public void setOutputStream(OutputStream output)
{
try
{
Properties format;
if (null == m_format)
format = OutputPropertiesFactory.getDefaultMethodProperties(Method.HTML);
else
format = m_format;
init(output, format, true);
}
catch (UnsupportedEncodingException uee)
{
// Should have been warned in init, I guess...
}
}
/**
* This method is used when a prefix/uri namespace mapping
* is indicated after the element was started with a

View File

@ -22,7 +22,7 @@
*/
package com.sun.org.apache.xml.internal.serializer;
import java.util.Vector;
import java.util.ArrayList;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
@ -234,9 +234,9 @@ public abstract class ToSAXHandler extends SerializerBase
/**
* Does nothing. The setting of CDATA section elements has an impact on
* stream serializers.
* @see SerializationHandler#setCdataSectionElements(java.util.Vector)
* @see SerializationHandler#setCdataSectionElements(java.util.ArrayList<String>)
*/
public void setCdataSectionElements(Vector URI_and_localNames)
public void setCdataSectionElements(ArrayList<String> URI_and_localNames)
{
// do nothing
}

View File

@ -3,9 +3,11 @@
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@ -25,11 +27,15 @@ package com.sun.org.apache.xml.internal.serializer;
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.Vector;
import java.util.ArrayList;
import javax.xml.transform.ErrorListener;
import javax.xml.transform.OutputKeys;
@ -186,9 +192,6 @@ abstract public class ToStream extends SerializerBase
*/
boolean m_isUTF8 = false;
/** The xsl:output properties. */
protected Properties m_format;
/**
* remembers if we are in between the startCDATA() and endCDATA() callbacks
*/
@ -306,6 +309,7 @@ abstract public class ToStream extends SerializerBase
}
}
OutputStream m_outputStream;
/**
* Get the output stream where the events will be serialized to.
*
@ -314,13 +318,7 @@ abstract public class ToStream extends SerializerBase
*/
public OutputStream getOutputStream()
{
if (m_writer instanceof WriterToUTF8Buffered)
return ((WriterToUTF8Buffered) m_writer).getOutputStream();
if (m_writer instanceof WriterToASCI)
return ((WriterToASCI) m_writer).getOutputStream();
else
return null;
return m_outputStream;
}
// Implement DeclHandler
@ -419,10 +417,174 @@ abstract public class ToStream extends SerializerBase
*/
protected final void outputLineSep() throws IOException
{
m_writer.write(m_lineSep, 0, m_lineSepLen);
}
void setProp(String name, String val, boolean defaultVal) {
if (val != null) {
char first = getFirstCharLocName(name);
switch (first) {
case 'c':
if (OutputKeys.CDATA_SECTION_ELEMENTS.equals(name)) {
addCdataSectionElements(val); // val is cdataSectionNames
}
break;
case 'd':
if (OutputKeys.DOCTYPE_SYSTEM.equals(name)) {
this.m_doctypeSystem = val;
} else if (OutputKeys.DOCTYPE_PUBLIC.equals(name)) {
this.m_doctypePublic = val;
if (val.startsWith("-//W3C//DTD XHTML"))
m_spaceBeforeClose = true;
}
break;
case 'e':
String newEncoding = val;
if (OutputKeys.ENCODING.equals(name)) {
String possible_encoding = Encodings.getMimeEncoding(val);
if (possible_encoding != null) {
// if the encoding is being set, try to get the
// preferred
// mime-name and set it too.
super.setProp("mime-name", possible_encoding,
defaultVal);
}
final String oldExplicitEncoding = getOutputPropertyNonDefault(OutputKeys.ENCODING);
final String oldDefaultEncoding = getOutputPropertyDefault(OutputKeys.ENCODING);
if ( (defaultVal && ( oldDefaultEncoding == null || !oldDefaultEncoding.equalsIgnoreCase(newEncoding)))
|| ( !defaultVal && (oldExplicitEncoding == null || !oldExplicitEncoding.equalsIgnoreCase(newEncoding) ))) {
// We are trying to change the default or the non-default setting of the encoding to a different value
// from what it was
EncodingInfo encodingInfo = Encodings.getEncodingInfo(newEncoding);
if (newEncoding != null && encodingInfo.name == null) {
// We tried to get an EncodingInfo for Object for the given
// encoding, but it came back with an internall null name
// so the encoding is not supported by the JDK, issue a message.
final String msg = Utils.messages.createMessage(
MsgKey.ER_ENCODING_NOT_SUPPORTED,new Object[]{ newEncoding });
final String msg2 =
"Warning: encoding \"" + newEncoding + "\" not supported, using "
+ Encodings.DEFAULT_MIME_ENCODING;
try {
// Prepare to issue the warning message
final Transformer tran = super.getTransformer();
if (tran != null) {
final ErrorListener errHandler = tran
.getErrorListener();
// Issue the warning message
if (null != errHandler
&& m_sourceLocator != null) {
errHandler
.warning(new TransformerException(
msg, m_sourceLocator));
errHandler
.warning(new TransformerException(
msg2, m_sourceLocator));
} else {
System.out.println(msg);
System.out.println(msg2);
}
} else {
System.out.println(msg);
System.out.println(msg2);
}
} catch (Exception e) {
}
// We said we are using UTF-8, so use it
newEncoding = Encodings.DEFAULT_MIME_ENCODING;
val = Encodings.DEFAULT_MIME_ENCODING; // to store the modified value into the properties a little later
encodingInfo = Encodings.getEncodingInfo(newEncoding);
}
// The encoding was good, or was forced to UTF-8 above
// If there is already a non-default set encoding and we
// are trying to set the default encoding, skip the this block
// as the non-default value is already the one to use.
if (defaultVal == false || oldExplicitEncoding == null) {
m_encodingInfo = encodingInfo;
if (newEncoding != null)
m_isUTF8 = newEncoding.equals(Encodings.DEFAULT_MIME_ENCODING);
// if there was a previously set OutputStream
OutputStream os = getOutputStream();
if (os != null) {
Writer w = getWriter();
// If the writer was previously set, but
// set by the user, or if the new encoding is the same
// as the old encoding, skip this block
String oldEncoding = getOutputProperty(OutputKeys.ENCODING);
if ((w == null || !m_writer_set_by_user)
&& !newEncoding.equalsIgnoreCase(oldEncoding)) {
// Make the change of encoding in our internal
// table, then call setOutputStreamInternal
// which will stomp on the old Writer (if any)
// with a new Writer with the new encoding.
super.setProp(name, val, defaultVal);
setOutputStreamInternal(os,false);
}
}
}
}
}
break;
case 'i':
if (OutputPropertiesFactory.S_KEY_INDENT_AMOUNT.equals(name)) {
setIndentAmount(Integer.parseInt(val));
} else if (OutputKeys.INDENT.equals(name)) {
boolean b = "yes".equals(val) ? true : false;
m_doIndent = b;
}
break;
case 'l':
if (OutputPropertiesFactory.S_KEY_LINE_SEPARATOR.equals(name)) {
m_lineSep = val.toCharArray();
m_lineSepLen = m_lineSep.length;
}
break;
case 'm':
if (OutputKeys.MEDIA_TYPE.equals(name)) {
m_mediatype = val;
}
break;
case 'o':
if (OutputKeys.OMIT_XML_DECLARATION.equals(name)) {
boolean b = "yes".equals(val) ? true : false;
this.m_shouldNotWriteXMLHeader = b;
}
break;
case 's':
// if standalone was explicitly specified
if (OutputKeys.STANDALONE.equals(name)) {
if (defaultVal) {
setStandaloneInternal(val);
} else {
m_standaloneWasSpecified = true;
setStandaloneInternal(val);
}
}
break;
case 'v':
if (OutputKeys.VERSION.equals(name)) {
m_version = val;
}
break;
default:
break;
}
super.setProp(name, val, defaultVal);
}
}
/**
* Specifies an output format for this serializer. It the
* serializer has already been associated with an output format,
@ -434,115 +596,34 @@ abstract public class ToStream extends SerializerBase
*/
public void setOutputFormat(Properties format)
{
boolean shouldFlush = m_shouldFlush;
init(m_writer, format, false, false);
m_shouldFlush = shouldFlush;
}
/**
* Initialize the serializer with the specified writer and output format.
* Must be called before calling any of the serialize methods.
* This method can be called multiple times and the xsl:output properties
* passed in the 'format' parameter are accumulated across calls.
*
* @param writer The writer to use
* @param format The output format
* @param shouldFlush True if the writer should be flushed at EndDocument.
*/
private synchronized void init(
Writer writer,
Properties format,
boolean defaultProperties,
boolean shouldFlush)
{
m_shouldFlush = shouldFlush;
// if we are tracing events we need to trace what
// characters are written to the output writer.
if (m_tracer != null
&& !(writer instanceof SerializerTraceWriter) )
m_writer = new SerializerTraceWriter(writer, m_tracer);
else
m_writer = writer;
m_format = format;
// m_cdataSectionNames =
// OutputProperties.getQNameProperties(
// OutputKeys.CDATA_SECTION_ELEMENTS,
// format);
setCdataSectionElements(OutputKeys.CDATA_SECTION_ELEMENTS, format);
setIndentAmount(
OutputPropertyUtils.getIntProperty(
OutputPropertiesFactory.S_KEY_INDENT_AMOUNT,
format));
setIndent(
OutputPropertyUtils.getBooleanProperty(OutputKeys.INDENT, format));
if (format != null)
{
String sep =
format.getProperty(OutputPropertiesFactory.S_KEY_LINE_SEPARATOR);
if (sep != null) {
m_lineSep = sep.toCharArray();
m_lineSepLen = sep.length();
// Set the default values first,
// and the non-default values after that,
// just in case there is some unexpected
// residual values left over from over-ridden default values
Enumeration propNames;
propNames = format.propertyNames();
while (propNames.hasMoreElements())
{
String key = (String) propNames.nextElement();
// Get the value, possibly a default value
String value = format.getProperty(key);
// Get the non-default value (if any).
String explicitValue = (String) format.get(key);
if (explicitValue == null && value != null) {
// This is a default value
this.setOutputPropertyDefault(key,value);
}
if (explicitValue != null) {
// This is an explicit non-default value
this.setOutputProperty(key,explicitValue);
}
}
}
boolean shouldNotWriteXMLHeader =
OutputPropertyUtils.getBooleanProperty(
OutputKeys.OMIT_XML_DECLARATION,
format);
setOmitXMLDeclaration(shouldNotWriteXMLHeader);
setDoctypeSystem(format.getProperty(OutputKeys.DOCTYPE_SYSTEM));
String doctypePublic = format.getProperty(OutputKeys.DOCTYPE_PUBLIC);
setDoctypePublic(doctypePublic);
// if standalone was explicitly specified
if (format.get(OutputKeys.STANDALONE) != null)
{
String val = format.getProperty(OutputKeys.STANDALONE);
if (defaultProperties)
setStandaloneInternal(val);
else
setStandalone(val);
}
setMediaType(format.getProperty(OutputKeys.MEDIA_TYPE));
if (null != doctypePublic)
{
if (doctypePublic.startsWith("-//W3C//DTD XHTML"))
m_spaceBeforeClose = true;
}
/*
* This code is added for XML 1.1 Version output.
*/
String version = getVersion();
if (null == version)
{
version = format.getProperty(OutputKeys.VERSION);
setVersion(version);
}
// initCharsMap();
String encoding = getEncoding();
if (null == encoding)
{
encoding =
Encodings.getMimeEncoding(
format.getProperty(OutputKeys.ENCODING));
setEncoding(encoding);
}
m_isUTF8 = encoding.equals(Encodings.DEFAULT_MIME_ENCODING);
// Access this only from the Hashtable level... we don't want to
// get default properties.
String entitiesFileName =
@ -557,107 +638,10 @@ abstract public class ToStream extends SerializerBase
m_charInfo = CharInfo.getCharInfo(entitiesFileName, method);
}
}
/**
* Initialize the serializer with the specified writer and output format.
* Must be called before calling any of the serialize methods.
*
* @param writer The writer to use
* @param format The output format
*/
private synchronized void init(Writer writer, Properties format)
{
init(writer, format, false, false);
}
/**
* Initialize the serializer with the specified output stream and output
* format. Must be called before calling any of the serialize methods.
*
* @param output The output stream to use
* @param format The output format
* @param defaultProperties true if the properties are the default
* properties
*
* @throws UnsupportedEncodingException The encoding specified in the
* output format is not supported
*/
protected synchronized void init(
OutputStream output,
Properties format,
boolean defaultProperties)
throws UnsupportedEncodingException
{
String encoding = getEncoding();
if (encoding == null)
{
// if not already set then get it from the properties
encoding =
Encodings.getMimeEncoding(
format.getProperty(OutputKeys.ENCODING));
setEncoding(encoding);
}
if (encoding.equalsIgnoreCase("UTF-8"))
{
m_isUTF8 = true;
// if (output instanceof java.io.BufferedOutputStream)
// {
// init(new WriterToUTF8(output), format, defaultProperties, true);
// }
// else if (output instanceof java.io.FileOutputStream)
// {
// init(new WriterToUTF8Buffered(output), format, defaultProperties, true);
// }
// else
// {
// // Not sure what to do in this case. I'm going to be conservative
// // and not buffer.
// init(new WriterToUTF8(output), format, defaultProperties, true);
// }
init(
new WriterToUTF8Buffered(output),
format,
defaultProperties,
true);
}
else if (
encoding.equals("WINDOWS-1250")
|| encoding.equals("US-ASCII")
|| encoding.equals("ASCII"))
{
init(new WriterToASCI(output), format, defaultProperties, true);
}
else
{
Writer osw;
try
{
osw = Encodings.getWriter(output, encoding);
}
catch (UnsupportedEncodingException uee)
{
System.out.println(
"Warning: encoding \""
+ encoding
+ "\" not supported"
+ ", using "
+ Encodings.DEFAULT_MIME_ENCODING);
encoding = Encodings.DEFAULT_MIME_ENCODING;
setEncoding(encoding);
osw = Encodings.getWriter(output, encoding);
}
init(osw, format, defaultProperties, true);
}
m_shouldFlush = shouldFlush;
}
/**
@ -665,9 +649,26 @@ abstract public class ToStream extends SerializerBase
*
* @return The output format in use
*/
public Properties getOutputFormat()
{
return m_format;
public Properties getOutputFormat() {
Properties def = new Properties();
{
Set<String> s = getOutputPropDefaultKeys();
for (String key : s) {
String val = getOutputPropertyDefault(key);
def.put(key, val);
}
}
Properties props = new Properties(def);
{
Set<String> s = getOutputPropKeys();
for (String key : s) {
String val = getOutputPropertyNonDefault(key);
if (val != null)
props.put(key, val);
}
}
return props;
}
/**
@ -679,13 +680,28 @@ abstract public class ToStream extends SerializerBase
*/
public void setWriter(Writer writer)
{
setWriterInternal(writer, true);
}
private boolean m_writer_set_by_user;
private void setWriterInternal(Writer writer, boolean setByUser) {
m_writer_set_by_user = setByUser;
m_writer = writer;
// if we are tracing events we need to trace what
// characters are written to the output writer.
if (m_tracer != null
&& !(writer instanceof SerializerTraceWriter) )
m_writer = new SerializerTraceWriter(writer, m_tracer);
else
m_writer = writer;
if (m_tracer != null) {
boolean noTracerYet = true;
Writer w2 = m_writer;
while (w2 instanceof WriterChain) {
if (w2 instanceof SerializerTraceWriter) {
noTracerYet = false;
break;
}
w2 = ((WriterChain)w2).getWriter();
}
if (noTracerYet)
m_writer = new SerializerTraceWriter(m_writer, m_tracer);
}
}
/**
@ -720,25 +736,68 @@ abstract public class ToStream extends SerializerBase
*/
public void setOutputStream(OutputStream output)
{
setOutputStreamInternal(output, true);
}
try
private void setOutputStreamInternal(OutputStream output, boolean setByUser)
{
m_outputStream = output;
String encoding = getOutputProperty(OutputKeys.ENCODING);
if (Encodings.DEFAULT_MIME_ENCODING.equalsIgnoreCase(encoding))
{
Properties format;
if (null == m_format)
format =
OutputPropertiesFactory.getDefaultMethodProperties(
Method.XML);
else
format = m_format;
init(output, format, true);
// We wrap the OutputStream with a writer, but
// not one set by the user
try {
setWriterInternal(new WriterToUTF8Buffered(output), false);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
} else if (
"WINDOWS-1250".equals(encoding)
|| "US-ASCII".equals(encoding)
|| "ASCII".equals(encoding))
{
setWriterInternal(new WriterToASCI(output), false);
} else if (encoding != null) {
Writer osw = null;
try
{
osw = Encodings.getWriter(output, encoding);
}
catch (UnsupportedEncodingException uee)
{
osw = null;
}
if (osw == null) {
System.out.println(
"Warning: encoding \""
+ encoding
+ "\" not supported"
+ ", using "
+ Encodings.DEFAULT_MIME_ENCODING);
encoding = Encodings.DEFAULT_MIME_ENCODING;
setEncoding(encoding);
try {
osw = Encodings.getWriter(output, encoding);
} catch (UnsupportedEncodingException e) {
// We can't really get here, UTF-8 is always supported
// This try-catch exists to make the compiler happy
e.printStackTrace();
}
}
setWriterInternal(osw,false);
}
catch (UnsupportedEncodingException uee)
{
// Should have been warned in init, I guess...
else {
// don't have any encoding, but we have an OutputStream
Writer osw = new OutputStreamWriter(output);
setWriterInternal(osw,false);
}
}
/**
* @see SerializationHandler#setEscaping(boolean)
*/
@ -2455,7 +2514,7 @@ abstract public class ToStream extends SerializerBase
* lets determine if the current element is specified in the cdata-
* section-elements list.
*/
if (m_cdataSectionElements != null)
if (m_StringOfCDATASections != null)
m_elemContext.m_isCdataSection = isCdataSection();
if (m_doIndent)
@ -2532,12 +2591,12 @@ abstract public class ToStream extends SerializerBase
* @param key the property key.
* @param props the list of properties to search in.
*
* Sets the vector of local-name/URI pairs of the cdata section elements
* Sets the ArrayList of local-name/URI pairs of the cdata section elements
* specified in the cdata-section-elements property.
*
* This method is essentially a copy of getQNameProperties() from
* OutputProperties. Eventually this method should go away and a call
* to setCdataSectionElements(Vector v) should be made directly.
* to setCdataSectionElements(ArrayList<String> v) should be made directly.
*/
private void setCdataSectionElements(String key, Properties props)
{
@ -2546,11 +2605,11 @@ abstract public class ToStream extends SerializerBase
if (null != s)
{
// Vector of URI/LocalName pairs
Vector v = new Vector();
// ArrayList<String> of URI/LocalName pairs
ArrayList<String> v = new ArrayList<>();
int l = s.length();
boolean inCurly = false;
StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
// parse through string, breaking on whitespaces. I do this instead
// of a tokenizer so I can track whitespace inside of curly brackets,
@ -2597,7 +2656,7 @@ abstract public class ToStream extends SerializerBase
*
* @return a QName object
*/
private void addCdataSectionElement(String URI_and_localName, Vector v)
private void addCdataSectionElement(String URI_and_localName, ArrayList<String> v)
{
StringTokenizer tokenizer =
@ -2608,14 +2667,14 @@ abstract public class ToStream extends SerializerBase
if (null == s2)
{
// add null URI and the local name
v.addElement(null);
v.addElement(s1);
v.add(null);
v.add(s1);
}
else
{
// add URI, then local name
v.addElement(s1);
v.addElement(s2);
v.add(s1);
v.add(s2);
}
}
@ -2624,11 +2683,38 @@ abstract public class ToStream extends SerializerBase
* The "official way to set URI and localName pairs.
* This method should be used by both Xalan and XSLTC.
*
* @param URI_and_localNames a vector of pairs of Strings (URI/local)
* @param URI_and_localNames an ArrayList of pairs of Strings (URI/local)
*/
public void setCdataSectionElements(Vector URI_and_localNames)
public void setCdataSectionElements(ArrayList<String> URI_and_localNames)
{
m_cdataSectionElements = URI_and_localNames;
// convert to the new way.
if (URI_and_localNames != null)
{
final int len = URI_and_localNames.size() - 1;
if (len > 0)
{
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < len; i += 2)
{
// whitspace separated "{uri1}local1 {uri2}local2 ..."
if (i != 0)
sb.append(' ');
final String uri = (String) URI_and_localNames.get(i);
final String localName =
(String) URI_and_localNames.get(i + 1);
if (uri != null)
{
// If there is no URI don't put this in, just the localName then.
sb.append('{');
sb.append(uri);
sb.append('}');
}
sb.append(localName);
}
m_StringOfCDATASections = sb.toString();
}
}
initCdataElems(m_StringOfCDATASections);
}
/**
@ -3084,37 +3170,7 @@ abstract public class ToStream extends SerializerBase
*/
public void setEncoding(String encoding)
{
String old = getEncoding();
super.setEncoding(encoding);
if (old == null || !old.equals(encoding)) {
// If we have changed the setting of the
m_encodingInfo = Encodings.getEncodingInfo(encoding);
if (encoding != null && m_encodingInfo.name == null) {
// We tried to get an EncodingInfo for Object for the given
// encoding, but it came back with an internall null name
// so the encoding is not supported by the JDK, issue a message.
String msg = Utils.messages.createMessage(
MsgKey.ER_ENCODING_NOT_SUPPORTED,new Object[]{ encoding });
try
{
// Prepare to issue the warning message
Transformer tran = super.getTransformer();
if (tran != null) {
ErrorListener errHandler = tran.getErrorListener();
// Issue the warning message
if (null != errHandler && m_sourceLocator != null)
errHandler.warning(new TransformerException(msg, m_sourceLocator));
else
System.out.println(msg);
}
else
System.out.println(msg);
}
catch (Exception e){}
}
}
return;
setOutputProperty(OutputKeys.ENCODING,encoding);
}
/**
@ -3386,4 +3442,24 @@ abstract public class ToStream extends SerializerBase
public void setDTDEntityExpansion(boolean expand) {
m_expandDTDEntities = expand;
}
/**
* Remembers the cdata sections specified in the cdata-section-elements by appending the given
* cdata section elements to the list. This method can be called multiple times, but once an
* element is put in the list of cdata section elements it can not be removed.
* This method should be used by both Xalan and XSLTC.
*
* @param URI_and_localNames a whitespace separated list of element names, each element
* is a URI in curly braces (optional) and a local name. An example of such a parameter is:
* "{http://company.com}price {myURI2}book chapter"
*/
public void addCdataSectionElements(String URI_and_localNames)
{
if (URI_and_localNames != null)
initCdataElems(URI_and_localNames);
if (m_StringOfCDATASections == null)
m_StringOfCDATASections = URI_and_localNames;
else
m_StringOfCDATASections += (" " + URI_and_localNames);
}
}

View File

@ -26,7 +26,7 @@ import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer;
import java.util.Properties;
import java.util.Vector;
import java.util.ArrayList;
import javax.xml.transform.SourceLocator;
import javax.xml.transform.Transformer;
@ -100,12 +100,12 @@ public final class ToUnknownStream extends SerializerBase
* A collection of namespace URI's (only for first element).
* _namespacePrefix has the matching prefix for these URI's
*/
private Vector m_namespaceURI = null;
private ArrayList<String> m_namespaceURI = null;
/**
* A collection of namespace Prefix (only for first element)
* _namespaceURI has the matching URIs for these prefix'
*/
private Vector m_namespacePrefix = null;
private ArrayList<String> m_namespacePrefix = null;
/**
* true if startDocument() was called before the underlying handler
@ -421,11 +421,11 @@ public final class ToUnknownStream extends SerializerBase
{
if (m_namespacePrefix == null)
{
m_namespacePrefix = new Vector();
m_namespaceURI = new Vector();
m_namespacePrefix = new ArrayList<>();
m_namespaceURI = new ArrayList<>();
}
m_namespacePrefix.addElement(prefix);
m_namespaceURI.addElement(uri);
m_namespacePrefix.add(prefix);
m_namespaceURI.add(uri);
if (m_firstElementURI == null)
{
@ -1092,8 +1092,8 @@ public final class ToUnknownStream extends SerializerBase
for (int i = 0; i < n; i++)
{
final String prefix =
(String) m_namespacePrefix.elementAt(i);
final String uri = (String) m_namespaceURI.elementAt(i);
(String) m_namespacePrefix.get(i);
final String uri = (String) m_namespaceURI.get(i);
m_handler.startPrefixMapping(prefix, uri, false);
}
m_namespacePrefix = null;
@ -1165,8 +1165,8 @@ public final class ToUnknownStream extends SerializerBase
final int max = m_namespacePrefix.size();
for (int i = 0; i < max; i++)
{
final String prefix = (String) m_namespacePrefix.elementAt(i);
final String uri = (String) m_namespaceURI.elementAt(i);
final String prefix = m_namespacePrefix.get(i);
final String uri = m_namespaceURI.get(i);
if (m_firstElementPrefix != null
&& m_firstElementPrefix.equals(prefix)
@ -1194,7 +1194,7 @@ public final class ToUnknownStream extends SerializerBase
* specified in the cdata-section-elements attribute.
* @see SerializationHandler#setCdataSectionElements(java.util.Vector)
*/
public void setCdataSectionElements(Vector URI_and_localNames)
public void setCdataSectionElements(ArrayList<String> URI_and_localNames)
{
m_handler.setCdataSectionElements(URI_and_localNames);
}

View File

@ -3,9 +3,11 @@
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*

View File

@ -3,9 +3,11 @@
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@ -22,7 +24,7 @@
*/
package com.sun.org.apache.xml.internal.serializer;
import java.util.Vector;
import java.util.ArrayList;
/**
* This interface has methods associated with the XSLT xsl:output attribues
@ -105,11 +107,6 @@ interface XSLOutputAttributes
*/
public String getVersion();
/**
* Sets the value coming from the xsl:output cdata-section-elements
* stylesheet property.
@ -124,7 +121,7 @@ interface XSLOutputAttributes
* relevant in specifying which elements have their text to be output as
* CDATA sections.
*/
public void setCdataSectionElements(Vector URI_and_localNames);
public void setCdataSectionElements(ArrayList<String> URI_and_localNames);
/** Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
* @param system the system identifier to be used in the DOCTYPE declaration
@ -181,4 +178,58 @@ interface XSLOutputAttributes
*/
public void setVersion(String version);
/**
* Get the value for a property that affects seraialization,
* if a property was set return that value, otherwise return
* the default value, otherwise return null.
* @param name The name of the property, which is just the local name
* if it is in no namespace, but is the URI in curly braces followed by
* the local name if it is in a namespace, for example:
* <ul>
* <li> "encoding"
* <li> "method"
* <li> "{http://xml.apache.org/xalan}indent-amount"
* <li> "{http://xml.apache.org/xalan}line-separator"
* </ul>
* @return The value of the parameter
*/
public String getOutputProperty(String name);
/**
* Get the default value for a property that affects seraialization,
* or null if there is none. It is possible that a non-default value
* was set for the property, however the value returned by this method
* is unaffected by any non-default settings.
* @param name The name of the property.
* @return The default value of the parameter, or null if there is no default value.
*/
public String getOutputPropertyDefault(String name);
/**
* Set the non-default value for a property that affects seraialization.
* @param name The name of the property, which is just the local name
* if it is in no namespace, but is the URI in curly braces followed by
* the local name if it is in a namespace, for example:
* <ul>
* <li> "encoding"
* <li> "method"
* <li> "{http://xml.apache.org/xalan}indent-amount"
* <li> "{http://xml.apache.org/xalan}line-separator"
* </ul>
* @val The non-default value of the parameter
*/
public void setOutputProperty(String name, String val);
/**
* Set the default value for a property that affects seraialization.
* @param name The name of the property, which is just the local name
* if it is in no namespace, but is the URI in curly braces followed by
* the local name if it is in a namespace, for example:
* <ul>
* <li> "encoding"
* <li> "method"
* <li> "{http://xml.apache.org/xalan}indent-amount"
* <li> "{http://xml.apache.org/xalan}line-separator"
* </ul>
* @val The default value of the parameter
*/
public void setOutputPropertyDefault(String name, String val);
}

View File

@ -352,7 +352,7 @@ public abstract class Entity {
}
/**each 'external' parsed entity may have xml/text declaration containing version information
* @return String version of the enity, for an internal entity version would be null
* @return String version of the entity, for an internal entity version would be null
*/
public String getEntityVersion(){
return version ;

View File

@ -34,7 +34,7 @@ import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
* @author Neeraj
*
* This class wraps XMLInputSource and is also capable of telling wether application
* returned XMLStreamReader or not when XMLResolver.resolveEnity
* returned XMLStreamReader or not when XMLResolver.resolveEntity
* was called.
*/
public class StaxXMLInputSource {

View File

@ -36,7 +36,7 @@ public class DatatypeConfigurationException extends Exception {
/**
* <p>Create a new <code>DatatypeConfigurationException</code> with
* no specified detail mesage and cause.</p>
* no specified detail message and cause.</p>
*/
public DatatypeConfigurationException() {

View File

@ -119,7 +119,7 @@ public abstract class DatatypeFactory {
Pattern.compile("[^YM]*[DT].*");
/**
* <p>Protected constructor to prevent instaniation outside of package.</p>
* <p>Protected constructor to prevent instantiation outside of package.</p>
*
* <p>Use {@link #newInstance()} to create a <code>DatatypeFactory</code>.</p>
*/

View File

@ -83,7 +83,7 @@ public class QName implements Serializable {
*
* <p>To workaround this issue, serialVersionUID is set with either
* a default value or a compatibility value. To use the
* compatiblity value, set the system property:</p>
* compatibility value, set the system property:</p>
*
* <code>com.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0</code>
*

View File

@ -423,7 +423,7 @@ public abstract class DocumentBuilderFactory {
* <ul>
* <li>
* <code>true</code>: the implementation will limit XML processing to conform to implementation limits.
* Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources.
* Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources.
* If XML processing is limited for security reasons, it will be reported via a call to the registered
* {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
* See {@link DocumentBuilder#setErrorHandler(org.xml.sax.ErrorHandler errorHandler)}.
@ -517,7 +517,7 @@ public abstract class DocumentBuilderFactory {
* modified DOM trees.
*
* <p>
* Initialy, null is set as the {@link Schema}.
* Initially, null is set as the {@link Schema}.
*
* <p>
* This processing will take effect even if
@ -531,7 +531,7 @@ public abstract class DocumentBuilderFactory {
* exception when the {@link #newDocumentBuilder()} is invoked.</p>
*
*
* <h4>Note for implmentors</h4>
* <h4>Note for implementors</h4>
*
* <p>
* A parser must be able to work with any {@link Schema}

View File

@ -45,7 +45,7 @@ public class FactoryConfigurationError extends Error {
/**
* Create a new <code>FactoryConfigurationError</code> with no
* detail mesage.
* detail message.
*/
public FactoryConfigurationError() {

View File

@ -35,7 +35,7 @@ public class ParserConfigurationException extends Exception {
/**
* Create a new <code>ParserConfigurationException</code> with no
* detail mesage.
* detail message.
*/
public ParserConfigurationException() {

View File

@ -69,7 +69,7 @@ import org.xml.sax.helpers.DefaultHandler;
* given {@link org.xml.sax.HandlerBase} or the
* {@link org.xml.sax.helpers.DefaultHandler} are called.<p>
*
* Implementors of this class which wrap an underlaying implementation
* Implementors of this class which wrap an underlying implementation
* can consider using the {@link org.xml.sax.helpers.ParserAdapter}
* class to initially adapt their SAX1 implementation to work under
* this revised class.
@ -79,7 +79,7 @@ import org.xml.sax.helpers.DefaultHandler;
public abstract class SAXParser {
/**
* <p>Protected constructor to prevent instaniation.
* <p>Protected constructor to prevent instantiation.
* Use {@link javax.xml.parsers.SAXParserFactory#newSAXParser()}.</p>
*/
protected SAXParser () {
@ -393,10 +393,10 @@ public abstract class SAXParser {
}
/**
* Returns the SAX parser that is encapsultated by the
* Returns the SAX parser that is encapsulated by the
* implementation of this class.
*
* @return The SAX parser that is encapsultated by the
* @return The SAX parser that is encapsulated by the
* implementation of this class.
*
* @throws SAXException If any SAX errors occur during processing.

View File

@ -359,7 +359,7 @@ public abstract class SAXParserFactory {
* is responsible to make sure that the application will receive
* those modified event stream.</p>
*
* <p>Initialy, <code>null</code> is set as the {@link Schema}.</p>
* <p>Initially, <code>null</code> is set as the {@link Schema}.</p>
*
* <p>This processing will take effect even if
* the {@link #isValidating()} method returns <code>false</code>.

View File

@ -28,7 +28,7 @@ package javax.xml.transform;
/**
* <p>To provide customized error handling, implement this interface and
* use the <code>setErrorListener</code> method to register an instance of the
* implmentation with the {@link javax.xml.transform.Transformer}. The
* implementation with the {@link javax.xml.transform.Transformer}. The
* <code>Transformer</code> then reports all errors and warnings through this
* interface.</p>
*

View File

@ -32,7 +32,7 @@ public class TransformerConfigurationException extends TransformerException {
/**
* Create a new <code>TransformerConfigurationException</code> with no
* detail mesage.
* detail message.
*/
public TransformerConfigurationException() {
super("Configuration Error");

View File

@ -42,7 +42,7 @@ public class TransformerFactoryConfigurationError extends Error {
/**
* Create a new <code>TransformerFactoryConfigurationError</code> with no
* detail mesage.
* detail message.
*/
public TransformerFactoryConfigurationError() {

View File

@ -358,7 +358,7 @@ public abstract class SchemaFactory {
* <ul>
* <li>
* <code>true</code>: the implementation will limit XML processing to conform to implementation limits.
* Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources.
* Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources.
* If XML processing is limited for security reasons, it will be reported via a call to the registered
* {@link ErrorHandler#fatalError(SAXParseException exception)}.
* See {@link #setErrorHandler(ErrorHandler errorHandler)}.

View File

@ -379,7 +379,7 @@ public abstract class ValidatorHandler implements ContentHandler {
* <ul>
* <li>
* <code>true</code>: the implementation will limit XML processing to conform to implementation limits.
* Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources.
* Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources.
* If XML processing is limited for security reasons, it will be reported via a call to the registered
* {@link ErrorHandler#fatalError(SAXParseException exception)}.
* See {@link #setErrorHandler(ErrorHandler errorHandler)}.

View File

@ -263,3 +263,4 @@ c9e8bb8c1144a966ca7b481142c6b5e55d14a29c jdk9-b09
e9780330017a6b464a385356d77e5136f9de8d09 jdk9-b15
1e1a3b2215b7551d88e89d1ca8c1e1ebe3d3c0ab jdk9-b16
6b159e727dac283f424b7d19f5be3ddd9f85acf5 jdk9-b17
275f2385aed80c84297840638d58656366350c58 jdk9-b18

View File

@ -260,3 +260,4 @@ c7c8002d02721e02131d104549ebeb8b379fb8d2 jdk9-b13
4537360f09fe23ab339ee588747b657feb12d0c8 jdk9-b15
ab7d2c565b0de5bee1361d282d4029371327fc9e jdk9-b16
fd8e675f141b9bdb2f46d1ae8251f4ee3a895d64 jdk9-b17
6ad17b31f0d30593392b1e8695b9709dbbd7fb70 jdk9-b18

View File

@ -370,7 +370,57 @@ int NET_Accept(int s, struct sockaddr *addr, int *addrlen) {
}
int NET_Connect(int s, struct sockaddr *addr, int addrlen) {
BLOCKING_IO_RETURN_INT( s, connect(s, addr, addrlen) );
int crc = -1, prc = -1;
threadEntry_t self;
fdEntry_t* fdEntry = getFdEntry(s);
if (fdEntry == NULL) {
errno = EBADF;
return -1;
}
/* On AIX, when the system call connect() is interrupted, the connection
* is not aborted and it will be established asynchronously by the kernel.
* Hence, no need to restart connect() when EINTR is received
*/
startOp(fdEntry, &self);
crc = connect(s, addr, addrlen);
endOp(fdEntry, &self);
if (crc == -1 && errno == EINTR) {
struct pollfd s_pollfd;
int sockopt_arg = 0;
socklen_t len;
s_pollfd.fd = s;
s_pollfd.events = POLLOUT | POLLERR;
/* poll the file descriptor */
do {
startOp(fdEntry, &self);
prc = poll(&s_pollfd, 1, -1);
endOp(fdEntry, &self);
} while (prc == -1 && errno == EINTR);
if (prc < 0)
return prc;
len = sizeof(sockopt_arg);
/* Check whether the connection has been established */
if (getsockopt(s, SOL_SOCKET, SO_ERROR, &sockopt_arg, &len) == -1)
return -1;
if (sockopt_arg != 0 ) {
errno = sockopt_arg;
return -1;
}
} else {
return crc;
}
/* At this point, fd is connected. Set successful return code */
return 0;
}
int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout) {

View File

@ -523,7 +523,7 @@ public final class LWCToolkit extends LWToolkit {
* that is used for menu shortcuts on this toolkit.
* @see java.awt.MenuBar
* @see java.awt.MenuShortcut
* @since JDK1.1
* @since 1.1
*/
@Override
public int getMenuShortcutKeyMask() {

View File

@ -839,7 +839,7 @@ class ConstantPool {
return parts;
}
/** @since JDK 7, JSR 292 */
/** @since 1.7, JSR 292 */
public static
class MethodHandleEntry extends Entry {
final int refKind;
@ -889,7 +889,7 @@ class ConstantPool {
}
}
/** @since JDK 7, JSR 292 */
/** @since 1.7, JSR 292 */
public static
class MethodTypeEntry extends Entry {
final SignatureEntry typeRef;
@ -924,7 +924,7 @@ class ConstantPool {
}
}
/** @since JDK 7, JSR 292 */
/** @since 1.7, JSR 292 */
public static
class InvokeDynamicEntry extends Entry {
final BootstrapMethodEntry bssRef;
@ -977,7 +977,7 @@ class ConstantPool {
}
}
/** @since JDK 7, JSR 292 */
/** @since 1.7, JSR 292 */
public static
class BootstrapMethodEntry extends Entry {
final MethodHandleEntry bsmRef;

View File

@ -97,7 +97,7 @@ http://www.ietf.org/rfc/rfc2616.txt
</ul>
<li>
@since JDK1.5.0</li>
@since 1.5</li>
<br><!-- Put @see and @since tags down here. -->
</body>

View File

@ -562,7 +562,7 @@ public class Introspector {
}
if (readMethod != null) {
ReflectUtil.checkPackageAccess(readMethod.getDeclaringClass());
return MethodUtil.invoke(readMethod, complex, new Class[0]);
return MethodUtil.invoke(readMethod, complex, new Class<?>[0]);
}
throw new AttributeNotFoundException(

View File

@ -757,7 +757,7 @@ public class MBeanInstantiator {
}
}
private static void ensureClassAccess(Class clazz)
private static void ensureClassAccess(Class<?> clazz)
throws IllegalAccessException
{
int mod = clazz.getModifiers();

View File

@ -58,7 +58,7 @@ public abstract class ClientNotifForwarder {
private final AccessControlContext acc;
public ClientNotifForwarder(Map env) {
public ClientNotifForwarder(Map<String, ?> env) {
this(null, env);
}

View File

@ -310,10 +310,10 @@ public class MBeanServerFileAccessController
}
});
if (s == null) return; /* security has not been enabled */
final Set principals = s.getPrincipals();
final Set<Principal> principals = s.getPrincipals();
String newPropertyValue = null;
for (Iterator i = principals.iterator(); i.hasNext(); ) {
final Principal p = (Principal) i.next();
for (Iterator<Principal> i = principals.iterator(); i.hasNext(); ) {
final Principal p = i.next();
Access access = accessMap.get(p.getName());
if (access != null) {
boolean ok;

View File

@ -535,7 +535,7 @@ final class SnmpRequestTree {
// Save old vectors
SnmpOid[] olde = entryoids;
Vector[] oldl = entrylists;
Vector<SnmpVarBind>[] oldl = entrylists;
boolean[] oldn = isentrynew;
SnmpVarBind[] oldr = rowstatus;

View File

@ -212,7 +212,7 @@ import javax.management.DynamicMBean;
* {@linkplain javax.management.Notification#getUserData() userData} that
* is the new {@code MBeanInfo}.
*
* @since 8
* @since 1.8
*/
public interface DiagnosticCommandMBean extends DynamicMBean
{

View File

@ -7697,7 +7697,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @param columnIndex the first column is 1, the second is 2, ...
* @return a SQLXML object that maps an SQL XML value
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public SQLXML getSQLXML(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7723,7 +7723,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @return the column value if the value is a SQL <code>NULL</code> the
* value returned is <code>null</code>
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public RowId getRowId(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7738,7 +7738,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @return the column value if the value is a SQL <code>NULL</code> the
* value returned is <code>null</code>
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public RowId getRowId(String columnName) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7754,7 +7754,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @param columnIndex the first column is 1, the second 2, ...
* @param x the column value
* @throws SQLException if a database access occurs
* @since 6.0
* @since 1.6
*/
public void updateRowId(int columnIndex, RowId x) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7770,7 +7770,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @param columnName the name of the column
* @param x the column value
* @throws SQLException if a database access occurs
* @since 6.0
* @since 1.6
*/
public void updateRowId(String columnName, RowId x) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7780,7 +7780,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* Retrieves the holdability of this ResultSet object
* @return either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
* @throws SQLException if a database error occurs
* @since 6.0
* @since 1.6
*/
public int getHoldability() throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7791,7 +7791,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* method close has been called on it, or if it is automatically closed.
* @return true if this ResultSet object is closed; false if it is still open
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public boolean isClosed() throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7803,7 +7803,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @param columnIndex the first column is 1, the second 2, ...
* @param nString the value for the column to be updated
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public void updateNString(int columnIndex, String nString) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7815,7 +7815,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @param columnName name of the Column
* @param nString the value for the column to be updated
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public void updateNString(String columnName, String nString) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7828,7 +7828,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @param columnIndex the first column is 1, the second 2, ...
* @param nClob the value for the column to be updated
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7840,7 +7840,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @param columnName name of the column
* @param nClob the value for the column to be updated
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public void updateNClob(String columnName, NClob nClob) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7855,7 +7855,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @return a <code>NClob</code> object representing the SQL
* <code>NCLOB</code> value in the specified column
* @exception SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public NClob getNClob(int i) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());
@ -7871,7 +7871,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
* @return a <code>NClob</code> object representing the SQL <code>NCLOB</code>
* value in the specified column
* @exception SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public NClob getNClob(String colName) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString());

View File

@ -4505,7 +4505,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @param columnIndex the first column is 1, the second is 2, ...
* @return a SQLXML object that maps an SQL XML value
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public SQLXML getSQLXML(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4531,7 +4531,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @return the column value if the value is a SQL <code>NULL</code> the
* value returned is <code>null</code>
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public RowId getRowId(int columnIndex) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4546,7 +4546,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @return the column value if the value is a SQL <code>NULL</code> the
* value returned is <code>null</code>
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public RowId getRowId(String columnName) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4562,7 +4562,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @param columnIndex the first column is 1, the second 2, ...
* @param x the column value
* @throws SQLException if a database access occurs
* @since 6.0
* @since 1.6
*/
public void updateRowId(int columnIndex, RowId x) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4578,7 +4578,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @param columnName the name of the column
* @param x the column value
* @throws SQLException if a database access occurs
* @since 6.0
* @since 1.6
*/
public void updateRowId(String columnName, RowId x) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4588,7 +4588,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* Retrieves the holdability of this ResultSet object
* @return either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
* @throws SQLException if a database error occurs
* @since 6.0
* @since 1.6
*/
public int getHoldability() throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4599,7 +4599,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* method close has been called on it, or if it is automatically closed.
* @return true if this ResultSet object is closed; false if it is still open
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public boolean isClosed() throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4611,7 +4611,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @param columnIndex the first column is 1, the second 2, ...
* @param nString the value for the column to be updated
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public void updateNString(int columnIndex, String nString) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4623,7 +4623,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @param columnName name of the Column
* @param nString the value for the column to be updated
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public void updateNString(String columnName, String nString) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4636,7 +4636,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @param columnIndex the first column is 1, the second 2, ...
* @param nClob the value for the column to be updated
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4648,7 +4648,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @param columnName name of the column
* @param nClob the value for the column to be updated
* @throws SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public void updateNClob(String columnName, NClob nClob) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4663,7 +4663,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @return a <code>NClob</code> object representing the SQL
* <code>NCLOB</code> value in the specified column
* @exception SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public NClob getNClob(int i) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@ -4679,7 +4679,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
* @return a <code>NClob</code> object representing the SQL <code>NCLOB</code>
* value in the specified column
* @exception SQLException if a database access error occurs
* @since 6.0
* @since 1.6
*/
public NClob getNClob(String colName) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());

View File

@ -76,16 +76,10 @@ import java.io.IOException;
* // attach to target VM
* VirtualMachine vm = VirtualMachine.attach("2177");
*
* // get system properties in target VM
* Properties props = vm.getSystemProperties();
*
* // construct path to management agent
* String home = props.getProperty("java.home");
* String agent = home + File.separator + "lib" + File.separator
* + "management-agent.jar";
*
* // load agent into target VM
* vm.loadAgent(agent, "com.sun.management.jmxremote.port=5000");
* // start management agent
* Properties props = new Properties();
* props.put("com.sun.management.jmxremote.port", "5000");
* vm.startManagementAgent(props);
*
* // detach
* vm.detach();
@ -93,9 +87,9 @@ import java.io.IOException;
* </pre>
*
* <p> In this example we attach to a Java virtual machine that is identified by
* the process identifier <code>2177</code>. The system properties from the target
* VM are then used to construct the path to a <i>management agent</i> which is then
* loaded into the target VM. Once loaded the client detaches from the target VM. </p>
* the process identifier <code>2177</code>. Then the JMX management agent is
* started in the target process using the supplied arguments. Finally, the
* client detaches from the target VM. </p>
*
* <p> A VirtualMachine is safe for use by multiple concurrent threads. </p>
*
@ -610,6 +604,68 @@ public abstract class VirtualMachine {
*/
public abstract Properties getAgentProperties() throws IOException;
/**
* Starts the JMX management agent in the target virtual machine.
*
* <p> The configuration properties are the same as those specified on
* the command line when starting the JMX management agent. In the same
* way as on the command line, you need to specify at least the
* {@code com.sun.management.jmxremote.port} property.
*
* <p> See the online documentation for <a
* href="../../../../../../../../technotes/guides/management/agent.html">
* Monitoring and Management Using JMX Technology</a> for further details.
*
* @param agentProperties
* A Properties object containing the configuration properties
* for the agent.
*
* @throws AttachOperationFailedException
* If the target virtual machine is unable to complete the
* attach operation. A more specific error message will be
* given by {@link AttachOperationFailedException#getMessage()}.
*
* @throws IOException
* If an I/O error occurs, a communication error for example,
* that cannot be identified as an error to indicate that the
* operation failed in the target VM.
*
* @throws IllegalArgumentException
* If keys or values in agentProperties are invalid.
*
* @throws NullPointerException
* If agentProperties is null.
*
* @since 1.9
*/
public abstract void startManagementAgent(Properties agentProperties) throws IOException;
/**
* Starts the local JMX management agent in the target virtual machine.
*
* <p> See the online documentation for <a
* href="../../../../../../../../technotes/guides/management/agent.html">
* Monitoring and Management Using JMX Technology</a> for further details.
*
* @return The String representation of the local connector's service address.
* The value can be parsed by the
* {@link javax.management.remote.JMXServiceURL#JMXServiceURL(String)}
* constructor.
*
* @throws AttachOperationFailedException
* If the target virtual machine is unable to complete the
* attach operation. A more specific error message will be
* given by {@link AttachOperationFailedException#getMessage()}.
*
* @throws IOException
* If an I/O error occurs, a communication error for example,
* that cannot be identified as an error to indicate that the
* operation failed in the target VM.
*
* @since 1.9
*/
public abstract String startLocalManagementAgent() throws IOException;
/**
* Returns a hash-code value for this VirtualMachine. The hash
* code is based upon the VirtualMachine's components, and satifies

View File

@ -45,7 +45,7 @@ import javax.accessibility.*;
*
* @author Arthur van Hoff
* @author Chris Warth
* @since JDK1.0
* @since 1.0
*/
public class Applet extends Panel {
@ -375,7 +375,7 @@ public class Applet extends Panel {
*
* @return the locale of the applet; if no locale has
* been set, the default locale is returned.
* @since JDK1.1
* @since 1.1
*/
public Locale getLocale() {
Locale locale = super.getLocale();

View File

@ -43,7 +43,7 @@ import java.util.Iterator;
* information about its environment.
*
* @author Arthur van Hoff
* @since JDK1.0
* @since 1.0
*/
public interface AppletContext {
/**

View File

@ -35,7 +35,7 @@ import java.net.URL;
*
* @author Arthur van Hoff
* @see java.applet.Applet#setStub(java.applet.AppletStub)
* @since JDK1.0
* @since 1.0
*/
public interface AppletStub {
/**

View File

@ -32,7 +32,7 @@ package java.applet;
* together to produce a composite.
*
* @author Arthur van Hoff
* @since JDK1.0
* @since 1.0
*/
public interface AudioClip {
/**

View File

@ -55,6 +55,6 @@ For overviews, tutorials, examples, guides, and tool documentation, please see:
</ul>
-->
@since JDK1.0
@since 1.0
</body>
</html>

View File

@ -41,7 +41,7 @@ public class AWTError extends Error {
* Constructs an instance of <code>AWTError</code> with the specified
* detail message.
* @param msg the detail message.
* @since JDK1.0
* @since 1.0
*/
public AWTError(String msg) {
super(msg);

View File

@ -43,7 +43,7 @@ public class AWTException extends Exception {
* instance of <code>String</code> that describes this particular
* exception.
* @param msg the detail message
* @since JDK1.0
* @since 1.0
*/
public AWTException(String msg) {
super(msg);

View File

@ -119,7 +119,7 @@ import java.util.Hashtable;
* @author Arthur van Hoff
* @see java.awt.Container#add(String, Component)
* @see java.awt.ComponentOrientation
* @since JDK1.0
* @since 1.0
*/
public class BorderLayout implements LayoutManager2,
java.io.Serializable {
@ -367,7 +367,7 @@ public class BorderLayout implements LayoutManager2,
/**
* Returns the horizontal gap between components.
* @since JDK1.1
* @since 1.1
*/
public int getHgap() {
return hgap;
@ -376,7 +376,7 @@ public class BorderLayout implements LayoutManager2,
/**
* Sets the horizontal gap between components.
* @param hgap the horizontal gap between components
* @since JDK1.1
* @since 1.1
*/
public void setHgap(int hgap) {
this.hgap = hgap;
@ -384,7 +384,7 @@ public class BorderLayout implements LayoutManager2,
/**
* Returns the vertical gap between components.
* @since JDK1.1
* @since 1.1
*/
public int getVgap() {
return vgap;
@ -393,7 +393,7 @@ public class BorderLayout implements LayoutManager2,
/**
* Sets the vertical gap between components.
* @param vgap the vertical gap between components
* @since JDK1.1
* @since 1.1
*/
public void setVgap(int vgap) {
this.vgap = vgap;
@ -415,7 +415,7 @@ public class BorderLayout implements LayoutManager2,
* @see java.awt.Container#add(java.awt.Component, java.lang.Object)
* @exception IllegalArgumentException if the constraint object is not
* a string, or if it not one of the five specified constants.
* @since JDK1.1
* @since 1.1
*/
public void addLayoutComponent(Component comp, Object constraints) {
synchronized (comp.getTreeLock()) {

View File

@ -82,7 +82,7 @@ import javax.accessibility.*;
* @see java.awt.event.ActionListener
* @see java.awt.Component#processMouseEvent
* @see java.awt.Component#addMouseListener
* @since JDK1.0
* @since 1.0
*/
public class Button extends Component implements Accessible {
@ -228,7 +228,7 @@ public class Button extends Component implements Accessible {
* If the string is <code>null</code> then the action command
* is set to match the label of the button.
* @see java.awt.event.ActionEvent
* @since JDK1.1
* @since 1.1
*/
public void setActionCommand(String command) {
actionCommand = command;
@ -255,7 +255,7 @@ public class Button extends Component implements Accessible {
* @see #removeActionListener
* @see #getActionListeners
* @see java.awt.event.ActionListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void addActionListener(ActionListener l) {
if (l == null) {
@ -277,7 +277,7 @@ public class Button extends Component implements Accessible {
* @see #addActionListener
* @see #getActionListeners
* @see java.awt.event.ActionListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeActionListener(ActionListener l) {
if (l == null) {
@ -370,7 +370,7 @@ public class Button extends Component implements Accessible {
* @param e the event
* @see java.awt.event.ActionEvent
* @see java.awt.Button#processActionEvent
* @since JDK1.1
* @since 1.1
*/
protected void processEvent(AWTEvent e) {
if (e instanceof ActionEvent) {
@ -401,7 +401,7 @@ public class Button extends Component implements Accessible {
* @see java.awt.event.ActionListener
* @see java.awt.Button#addActionListener
* @see java.awt.Component#enableEvents
* @since JDK1.1
* @since 1.1
*/
protected void processActionEvent(ActionEvent e) {
ActionListener listener = actionListener;

View File

@ -39,7 +39,7 @@ import javax.accessibility.*;
* in order to perform custom graphics on the canvas.
*
* @author Sami Shaio
* @since JDK1.0
* @since 1.0
*/
public class Canvas extends Component implements Accessible {

View File

@ -53,7 +53,7 @@ import java.io.IOException;
*
* @author Arthur van Hoff
* @see java.awt.Container
* @since JDK1.0
* @since 1.0
*/
public class CardLayout implements LayoutManager2,
@ -148,7 +148,7 @@ public class CardLayout implements LayoutManager2,
* @return the horizontal gap between components.
* @see java.awt.CardLayout#setHgap(int)
* @see java.awt.CardLayout#getVgap()
* @since JDK1.1
* @since 1.1
*/
public int getHgap() {
return hgap;
@ -159,7 +159,7 @@ public class CardLayout implements LayoutManager2,
* @param hgap the horizontal gap between components.
* @see java.awt.CardLayout#getHgap()
* @see java.awt.CardLayout#setVgap(int)
* @since JDK1.1
* @since 1.1
*/
public void setHgap(int hgap) {
this.hgap = hgap;
@ -180,7 +180,7 @@ public class CardLayout implements LayoutManager2,
* @param vgap the vertical gap between components.
* @see java.awt.CardLayout#getVgap()
* @see java.awt.CardLayout#setHgap(int)
* @since JDK1.1
* @since 1.1
*/
public void setVgap(int vgap) {
this.vgap = vgap;

View File

@ -71,7 +71,7 @@ import javax.accessibility.*;
* @author Sami Shaio
* @see java.awt.GridLayout
* @see java.awt.CheckboxGroup
* @since JDK1.0
* @since 1.0
*/
public class Checkbox extends Component implements ItemSelectable, Accessible {
@ -190,7 +190,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible {
* <code>GraphicsEnvironment.isHeadless</code>
* returns <code>true</code>
* @see java.awt.GraphicsEnvironment#isHeadless
* @since JDK1.1
* @since 1.1
*/
public Checkbox(String label, boolean state, CheckboxGroup group)
throws HeadlessException {
@ -216,7 +216,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible {
* <code>GraphicsEnvironment.isHeadless</code>
* returns <code>true</code>
* @see java.awt.GraphicsEnvironment#isHeadless
* @since JDK1.1
* @since 1.1
*/
public Checkbox(String label, CheckboxGroup group, boolean state)
throws HeadlessException {
@ -424,7 +424,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible {
* @see #setState
* @see java.awt.event.ItemEvent
* @see java.awt.event.ItemListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void addItemListener(ItemListener l) {
if (l == null) {
@ -446,7 +446,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible {
* @see #getItemListeners
* @see java.awt.event.ItemEvent
* @see java.awt.event.ItemListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeItemListener(ItemListener l) {
if (l == null) {
@ -540,7 +540,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible {
* @param e the event
* @see java.awt.event.ItemEvent
* @see #processItemEvent
* @since JDK1.1
* @since 1.1
*/
protected void processEvent(AWTEvent e) {
if (e instanceof ItemEvent) {
@ -572,7 +572,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible {
* @see java.awt.event.ItemListener
* @see #addItemListener
* @see java.awt.Component#enableEvents
* @since JDK1.1
* @since 1.1
*/
protected void processItemEvent(ItemEvent e) {
ItemListener listener = itemListener;

View File

@ -52,7 +52,7 @@ package java.awt;
*
* @author Sami Shaio
* @see java.awt.Checkbox
* @since JDK1.0
* @since 1.0
*/
public class CheckboxGroup implements java.io.Serializable {
/**
@ -84,7 +84,7 @@ public class CheckboxGroup implements java.io.Serializable {
* "on" state, or <code>null</code>.
* @see java.awt.Checkbox
* @see java.awt.CheckboxGroup#setSelectedCheckbox
* @since JDK1.1
* @since 1.1
*/
public Checkbox getSelectedCheckbox() {
return getCurrent();
@ -113,7 +113,7 @@ public class CheckboxGroup implements java.io.Serializable {
* current selection.
* @see java.awt.Checkbox
* @see java.awt.CheckboxGroup#getSelectedCheckbox
* @since JDK1.1
* @since 1.1
*/
public void setSelectedCheckbox(Checkbox box) {
setCurrent(box);

View File

@ -59,7 +59,7 @@ import sun.awt.AWTAccessor;
* @author Sami Shaio
* @see java.awt.event.ItemEvent
* @see java.awt.event.ItemListener
* @since JDK1.0
* @since 1.0
*/
public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Accessible {
@ -102,7 +102,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
* @since JDK1.1
* @since 1.1
*/
public CheckboxMenuItem() throws HeadlessException {
this("", false);
@ -132,7 +132,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
* @since JDK1.1
* @since 1.1
*/
public CheckboxMenuItem(String label, boolean state)
throws HeadlessException {
@ -231,7 +231,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access
* @see #setState
* @see java.awt.event.ItemEvent
* @see java.awt.event.ItemListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void addItemListener(ItemListener l) {
if (l == null) {
@ -253,7 +253,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access
* @see #getItemListeners
* @see java.awt.event.ItemEvent
* @see java.awt.event.ItemListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeItemListener(ItemListener l) {
if (l == null) {
@ -350,7 +350,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access
* @param e the event
* @see java.awt.event.ItemEvent
* @see #processItemEvent
* @since JDK1.1
* @since 1.1
*/
protected void processEvent(AWTEvent e) {
if (e instanceof ItemEvent) {
@ -381,7 +381,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access
* @see java.awt.event.ItemListener
* @see #addItemListener
* @see java.awt.MenuItem#enableEvents
* @since JDK1.1
* @since 1.1
*/
protected void processItemEvent(ItemEvent e) {
ItemListener listener = itemListener;

View File

@ -68,7 +68,7 @@ import javax.accessibility.*;
*
* @author Sami Shaio
* @author Arthur van Hoff
* @since JDK1.0
* @since 1.0
*/
public class Choice extends Component implements ItemSelectable, Accessible {
/**
@ -158,7 +158,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
* Returns the number of items in this <code>Choice</code> menu.
* @return the number of items in this <code>Choice</code> menu
* @see #getItem
* @since JDK1.1
* @since 1.1
*/
public int getItemCount() {
return countItems();
@ -196,7 +196,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
* @param item the item to be added
* @exception NullPointerException if the item's value is
* <code>null</code>
* @since JDK1.1
* @since 1.1
*/
public void add(String item) {
addItem(item);
@ -291,7 +291,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
* @param item the item to remove from this <code>Choice</code> menu
* @exception IllegalArgumentException if the item doesn't
* exist in the choice menu
* @since JDK1.1
* @since 1.1
*/
public void remove(String item) {
synchronized (this) {
@ -319,7 +319,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
* @param position the position of the item
* @throws IndexOutOfBoundsException if the specified
* position is out of bounds
* @since JDK1.1
* @since 1.1
*/
public void remove(int position) {
synchronized (this) {
@ -357,7 +357,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
/**
* Removes all items from the choice menu.
* @see #remove
* @since JDK1.1
* @since 1.1
*/
public void removeAll() {
synchronized (this) {
@ -475,7 +475,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
* @see #select
* @see java.awt.event.ItemEvent
* @see java.awt.event.ItemListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void addItemListener(ItemListener l) {
if (l == null) {
@ -497,7 +497,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
* @see #getItemListeners
* @see java.awt.event.ItemEvent
* @see java.awt.event.ItemListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeItemListener(ItemListener l) {
if (l == null) {
@ -591,7 +591,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
* @param e the event
* @see java.awt.event.ItemEvent
* @see #processItemEvent
* @since JDK1.1
* @since 1.1
*/
protected void processEvent(AWTEvent e) {
if (e instanceof ItemEvent) {
@ -623,7 +623,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
* @see java.awt.event.ItemListener
* @see #addItemListener(ItemListener)
* @see java.awt.Component#enableEvents
* @since JDK1.1
* @since 1.1
*/
protected void processItemEvent(ItemEvent e) {
ItemListener listener = itemListener;

View File

@ -597,7 +597,7 @@ public class Color implements Paint, java.io.Serializable {
* @see #getRed
* @see #getGreen
* @see #getBlue
* @since JDK1.0
* @since 1.0
*/
public int getRGB() {
return value;
@ -621,7 +621,7 @@ public class Color implements Paint, java.io.Serializable {
* a brighter version of this <code>Color</code>
* with the same {@code alpha} value.
* @see java.awt.Color#darker
* @since JDK1.0
* @since 1.0
*/
public Color brighter() {
int r = getRed();
@ -664,7 +664,7 @@ public class Color implements Paint, java.io.Serializable {
* a darker version of this <code>Color</code>
* with the same {@code alpha} value.
* @see java.awt.Color#brighter
* @since JDK1.0
* @since 1.0
*/
public Color darker() {
return new Color(Math.max((int)(getRed() *FACTOR), 0),
@ -676,7 +676,7 @@ public class Color implements Paint, java.io.Serializable {
/**
* Computes the hash code for this <code>Color</code>.
* @return a hash code value for this object.
* @since JDK1.0
* @since 1.0
*/
public int hashCode() {
return value;
@ -693,7 +693,7 @@ public class Color implements Paint, java.io.Serializable {
* <code>Color</code>
* @return <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @since JDK1.0
* @since 1.0
*/
public boolean equals(Object obj) {
return obj instanceof Color && ((Color)obj).getRGB() == this.getRGB();
@ -723,7 +723,7 @@ public class Color implements Paint, java.io.Serializable {
* @exception NumberFormatException if the specified string cannot
* be interpreted as a decimal,
* octal, or hexadecimal integer.
* @since JDK1.1
* @since 1.1
*/
public static Color decode(String nm) throws NumberFormatException {
Integer intval = Integer.decode(nm);
@ -747,7 +747,7 @@ public class Color implements Paint, java.io.Serializable {
* @see java.lang.System#getProperty(java.lang.String)
* @see java.lang.Integer#getInteger(java.lang.String)
* @see java.awt.Color#Color(int)
* @since JDK1.0
* @since 1.0
*/
public static Color getColor(String nm) {
return getColor(nm, null);
@ -771,7 +771,7 @@ public class Color implements Paint, java.io.Serializable {
* @see java.lang.System#getProperty(java.lang.String)
* @see java.lang.Integer#getInteger(java.lang.String)
* @see java.awt.Color#Color(int)
* @since JDK1.0
* @since 1.0
*/
public static Color getColor(String nm, Color v) {
Integer intval = Integer.getInteger(nm);
@ -801,7 +801,7 @@ public class Color implements Paint, java.io.Serializable {
* @see java.lang.System#getProperty(java.lang.String)
* @see java.lang.Integer#getInteger(java.lang.String)
* @see java.awt.Color#Color(int)
* @since JDK1.0
* @since 1.0
*/
public static Color getColor(String nm, int v) {
Integer intval = Integer.getInteger(nm);
@ -834,7 +834,7 @@ public class Color implements Paint, java.io.Serializable {
* @see java.awt.Color#getRGB()
* @see java.awt.Color#Color(int)
* @see java.awt.image.ColorModel#getRGBdefault()
* @since JDK1.0
* @since 1.0
*/
public static int HSBtoRGB(float hue, float saturation, float brightness) {
int r = 0, g = 0, b = 0;
@ -902,7 +902,7 @@ public class Color implements Paint, java.io.Serializable {
* @see java.awt.Color#getRGB()
* @see java.awt.Color#Color(int)
* @see java.awt.image.ColorModel#getRGBdefault()
* @since JDK1.0
* @since 1.0
*/
public static float[] RGBtoHSB(int r, int g, int b, float[] hsbvals) {
float hue, saturation, brightness;
@ -957,7 +957,7 @@ public class Color implements Paint, java.io.Serializable {
* @param b the brightness of the color
* @return a <code>Color</code> object with the specified hue,
* saturation, and brightness.
* @since JDK1.0
* @since 1.0
*/
public static Color getHSBColor(float h, float s, float b) {
return new Color(HSBtoRGB(h, s, b));

View File

@ -1018,7 +1018,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* Gets the name of the component.
* @return this component's name
* @see #setName
* @since JDK1.1
* @since 1.1
*/
public String getName() {
if (name == null && !nameExplicitlySet) {
@ -1035,7 +1035,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param name the string that is to be this
* component's name
* @see #getName
* @since JDK1.1
* @since 1.1
*/
public void setName(String name) {
String oldName;
@ -1050,7 +1050,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
/**
* Gets the parent of this component.
* @return the parent container of this component
* @since JDK1.0
* @since 1.0
*/
public Container getParent() {
return getParent_NoClientCode();
@ -1221,7 +1221,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* toolkit is used by that component. Therefore if the component
* is moved from one frame to another, the toolkit it uses may change.
* @return the toolkit of this component
* @since JDK1.0
* @since 1.0
*/
public Toolkit getToolkit() {
return getToolkitImpl();
@ -1250,7 +1250,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* otherwise
* @see #validate
* @see #invalidate
* @since JDK1.0
* @since 1.0
*/
public boolean isValid() {
return (peer != null) && valid;
@ -1292,7 +1292,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @return <code>true</code> if the component is visible,
* <code>false</code> otherwise
* @see #setVisible
* @since JDK1.0
* @since 1.0
*/
@Transient
public boolean isVisible() {
@ -1419,7 +1419,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @return <code>true</code> if the component is showing,
* <code>false</code> otherwise
* @see #setVisible
* @since JDK1.0
* @since 1.0
*/
public boolean isShowing() {
if (visible && (peer != null)) {
@ -1437,7 +1437,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @return <code>true</code> if the component is enabled,
* <code>false</code> otherwise
* @see #setEnabled
* @since JDK1.0
* @since 1.0
*/
public boolean isEnabled() {
return isEnabledImpl();
@ -1466,7 +1466,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* enabled; otherwise this component is disabled
* @see #isEnabled
* @see #isLightweight
* @since JDK1.1
* @since 1.1
*/
public void setEnabled(boolean b) {
enable(b);
@ -1611,7 +1611,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* otherwise, hides this component
* @see #isVisible
* @see #invalidate
* @since JDK1.1
* @since 1.1
*/
public void setVisible(boolean b) {
show(b);
@ -1739,7 +1739,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* not have a foreground color, the foreground color of its parent
* is returned
* @see #setForeground
* @since JDK1.0
* @since 1.0
* @beaninfo
* bound: true
*/
@ -1760,7 +1760,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* then this component will inherit
* the foreground color of its parent
* @see #getForeground
* @since JDK1.0
* @since 1.0
*/
public void setForeground(Color c) {
Color oldColor = foreground;
@ -1796,7 +1796,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* not have a background color,
* the background color of its parent is returned
* @see #setBackground
* @since JDK1.0
* @since 1.0
*/
@Transient
public Color getBackground() {
@ -1819,7 +1819,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* if this parameter is <code>null</code>, then this
* component will inherit the background color of its parent
* @see #getBackground
* @since JDK1.0
* @since 1.0
* @beaninfo
* bound: true
*/
@ -1856,7 +1856,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @return this component's font; if a font has not been set
* for this component, the font of its parent is returned
* @see #setFont
* @since JDK1.0
* @since 1.0
*/
@Transient
public Font getFont() {
@ -1887,7 +1887,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* component will inherit the font of its parent
* @see #getFont
* @see #invalidate
* @since JDK1.0
* @since 1.0
* @beaninfo
* bound: true
*/
@ -1940,7 +1940,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* does not have its own locale and has not yet been added to
* a containment hierarchy such that the locale can be determined
* from the containing parent
* @since JDK1.1
* @since 1.1
*/
public Locale getLocale() {
Locale locale = this.locale;
@ -1965,7 +1965,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param l the locale to become this component's locale
* @see #getLocale
* @see #invalidate
* @since JDK1.1
* @since 1.1
*/
public void setLocale(Locale l) {
Locale oldValue = locale;
@ -1986,7 +1986,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.image.ColorModel
* @see java.awt.peer.ComponentPeer#getColorModel()
* @see Toolkit#getColorModel()
* @since JDK1.0
* @since 1.0
*/
public ColorModel getColorModel() {
ComponentPeer peer = this.peer;
@ -2016,7 +2016,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* the coordinate space of the component's parent
* @see #setLocation
* @see #getLocationOnScreen
* @since JDK1.1
* @since 1.1
*/
public Point getLocation() {
return location();
@ -2095,7 +2095,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #getLocation
* @see #setBounds
* @see #invalidate
* @since JDK1.1
* @since 1.1
*/
public void setLocation(int x, int y) {
move(x, y);
@ -2127,7 +2127,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #getLocation
* @see #setBounds
* @see #invalidate
* @since JDK1.1
* @since 1.1
*/
public void setLocation(Point p) {
setLocation(p.x, p.y);
@ -2143,7 +2143,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @return a <code>Dimension</code> object that indicates the
* size of this component
* @see #setSize
* @since JDK1.1
* @since 1.1
*/
public Dimension getSize() {
return size();
@ -2170,7 +2170,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #getSize
* @see #setBounds
* @see #invalidate
* @since JDK1.1
* @since 1.1
*/
public void setSize(int width, int height) {
resize(width, height);
@ -2201,7 +2201,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #setSize
* @see #setBounds
* @see #invalidate
* @since JDK1.1
* @since 1.1
*/
public void setSize(Dimension d) {
resize(d);
@ -2258,7 +2258,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #setSize(int, int)
* @see #setSize(Dimension)
* @see #invalidate
* @since JDK1.1
* @since 1.1
*/
public void setBounds(int x, int y, int width, int height) {
reshape(x, y, width, height);
@ -2402,7 +2402,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #setSize(int, int)
* @see #setSize(Dimension)
* @see #invalidate
* @since JDK1.1
* @since 1.1
*/
public void setBounds(Rectangle r) {
setBounds(r.x, r.y, r.width, r.height);
@ -2883,7 +2883,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #doLayout()
* @see LayoutManager
* @see Container#validate
* @since JDK1.0
* @since 1.0
*/
public void validate() {
synchronized (getTreeLock()) {
@ -2926,7 +2926,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #doLayout
* @see LayoutManager
* @see java.awt.Container#isValidateRoot
* @since JDK1.0
* @since 1.0
*/
public void invalidate() {
synchronized (getTreeLock()) {
@ -3021,7 +3021,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @return a graphics context for this component, or <code>null</code>
* if it has none
* @see #paint
* @since JDK1.0
* @since 1.0
*/
public Graphics getGraphics() {
if (peer instanceof LightweightPeer) {
@ -3085,7 +3085,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #getPeer
* @see java.awt.peer.ComponentPeer#getFontMetrics(Font)
* @see Toolkit#getFontMetrics(Font)
* @since JDK1.0
* @since 1.0
*/
public FontMetrics getFontMetrics(Font font) {
// This is an unsupported hack, but left in for a customer.
@ -3125,7 +3125,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #contains
* @see Toolkit#createCustomCursor
* @see Cursor
* @since JDK1.1
* @since 1.1
*/
public void setCursor(Cursor cursor) {
this.cursor = cursor;
@ -3158,7 +3158,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* If no cursor is set in the entire hierarchy,
* <code>Cursor.DEFAULT_CURSOR</code> is returned.
* @see #setCursor
* @since JDK1.1
* @since 1.1
*/
public Cursor getCursor() {
return getCursor_NoClientCode();
@ -3212,7 +3212,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
*
* @param g the graphics context to use for painting
* @see #update
* @since JDK1.0
* @since 1.0
*/
public void paint(Graphics g) {
}
@ -3248,7 +3248,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param g the specified context to use for updating
* @see #paint
* @see #repaint()
* @since JDK1.0
* @since 1.0
*/
public void update(Graphics g) {
paint(g);
@ -3264,7 +3264,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
*
* @param g the graphics context to use for painting
* @see #paint
* @since JDK1.0
* @since 1.0
*/
public void paintAll(Graphics g) {
if (isShowing()) {
@ -3308,7 +3308,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
*
* @see #update(Graphics)
* @since JDK1.0
* @since 1.0
*/
public void repaint() {
repaint(0, 0, 0, width, height);
@ -3327,7 +3327,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param tm maximum time in milliseconds before update
* @see #paint
* @see #update(Graphics)
* @since JDK1.0
* @since 1.0
*/
public void repaint(long tm) {
repaint(tm, 0, 0, width, height);
@ -3351,7 +3351,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param width the width
* @param height the height
* @see #update(Graphics)
* @since JDK1.0
* @since 1.0
*/
public void repaint(int x, int y, int width, int height) {
repaint(0, x, y, width, height);
@ -3377,7 +3377,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param width the width
* @param height the height
* @see #update(Graphics)
* @since JDK1.0
* @since 1.0
*/
public void repaint(long tm, int x, int y, int width, int height) {
if (this.peer instanceof LightweightPeer) {
@ -3430,7 +3430,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* graphics context is the bounding rectangle of this component.
* @param g the graphics context to use for printing
* @see #paint(Graphics)
* @since JDK1.0
* @since 1.0
*/
public void print(Graphics g) {
paint(g);
@ -3445,7 +3445,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* graphics context is the bounding rectangle of this component.
* @param g the graphics context to use for printing
* @see #print(Graphics)
* @since JDK1.0
* @since 1.0
*/
public void printAll(Graphics g) {
if (isShowing()) {
@ -3525,7 +3525,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see Graphics#drawImage(Image, int, int, int, int, Color, java.awt.image.ImageObserver)
* @see Graphics#drawImage(Image, int, int, int, int, java.awt.image.ImageObserver)
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
* @since JDK1.0
* @since 1.0
*/
public boolean imageUpdate(Image img, int infoflags,
int x, int y, int w, int h) {
@ -3550,7 +3550,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* Creates an image from the specified image producer.
* @param producer the image producer
* @return the image produced
* @since JDK1.0
* @since 1.0
*/
public Image createImage(ImageProducer producer) {
ComponentPeer peer = this.peer;
@ -3572,7 +3572,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* <code>true</code>.
* @see #isDisplayable
* @see GraphicsEnvironment#isHeadless
* @since JDK1.0
* @since 1.0
*/
public Image createImage(int width, int height) {
ComponentPeer peer = this.peer;
@ -3643,7 +3643,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* to be notified as the image is being prepared
* @return <code>true</code> if the image has already been fully
* prepared; <code>false</code> otherwise
* @since JDK1.0
* @since 1.0
*/
public boolean prepareImage(Image image, ImageObserver observer) {
return prepareImage(image, -1, -1, observer);
@ -3665,7 +3665,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @return <code>true</code> if the image has already been fully
* prepared; <code>false</code> otherwise
* @see java.awt.image.ImageObserver
* @since JDK1.0
* @since 1.0
*/
public boolean prepareImage(Image image, int width, int height,
ImageObserver observer) {
@ -3701,7 +3701,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #prepareImage(Image, int, int, java.awt.image.ImageObserver)
* @see Toolkit#checkImage(Image, int, int, java.awt.image.ImageObserver)
* @see java.awt.image.ImageObserver
* @since JDK1.0
* @since 1.0
*/
public int checkImage(Image image, ImageObserver observer) {
return checkImage(image, -1, -1, observer);
@ -3737,7 +3737,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #prepareImage(Image, int, int, java.awt.image.ImageObserver)
* @see Toolkit#checkImage(Image, int, int, java.awt.image.ImageObserver)
* @see java.awt.image.ImageObserver
* @since JDK1.0
* @since 1.0
*/
public int checkImage(Image image, int width, int height,
ImageObserver observer) {
@ -4622,7 +4622,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param x the <i>x</i> coordinate of the point
* @param y the <i>y</i> coordinate of the point
* @see #getComponentAt(int, int)
* @since JDK1.1
* @since 1.1
*/
public boolean contains(int x, int y) {
return inside(x, y);
@ -4644,7 +4644,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param p the point
* @throws NullPointerException if {@code p} is {@code null}
* @see #getComponentAt(Point)
* @since JDK1.1
* @since 1.1
*/
public boolean contains(Point p) {
return contains(p.x, p.y);
@ -4669,7 +4669,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* <code>null</code> if the location
* is outside this component
* @see #contains(int, int)
* @since JDK1.0
* @since 1.0
*/
public Component getComponentAt(int x, int y) {
return locate(x, y);
@ -4689,7 +4689,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* specified point.
* @param p the point
* @see java.awt.Component#contains
* @since JDK1.1
* @since 1.1
*/
public Component getComponentAt(Point p) {
return getComponentAt(p.x, p.y);
@ -5224,7 +5224,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.ComponentListener
* @see #removeComponentListener
* @see #getComponentListeners
* @since JDK1.1
* @since 1.1
*/
public synchronized void addComponentListener(ComponentListener l) {
if (l == null) {
@ -5248,7 +5248,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.ComponentListener
* @see #addComponentListener
* @see #getComponentListeners
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeComponentListener(ComponentListener l) {
if (l == null) {
@ -5286,7 +5286,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.FocusListener
* @see #removeFocusListener
* @see #getFocusListeners
* @since JDK1.1
* @since 1.1
*/
public synchronized void addFocusListener(FocusListener l) {
if (l == null) {
@ -5317,7 +5317,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.FocusListener
* @see #addFocusListener
* @see #getFocusListeners
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeFocusListener(FocusListener l) {
if (l == null) {
@ -5618,7 +5618,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.KeyListener
* @see #removeKeyListener
* @see #getKeyListeners
* @since JDK1.1
* @since 1.1
*/
public synchronized void addKeyListener(KeyListener l) {
if (l == null) {
@ -5649,7 +5649,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.KeyListener
* @see #addKeyListener
* @see #getKeyListeners
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeKeyListener(KeyListener l) {
if (l == null) {
@ -5687,7 +5687,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.MouseListener
* @see #removeMouseListener
* @see #getMouseListeners
* @since JDK1.1
* @since 1.1
*/
public synchronized void addMouseListener(MouseListener l) {
if (l == null) {
@ -5718,7 +5718,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.MouseListener
* @see #addMouseListener
* @see #getMouseListeners
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeMouseListener(MouseListener l) {
if (l == null) {
@ -5756,7 +5756,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.MouseMotionListener
* @see #removeMouseMotionListener
* @see #getMouseMotionListeners
* @since JDK1.1
* @since 1.1
*/
public synchronized void addMouseMotionListener(MouseMotionListener l) {
if (l == null) {
@ -5787,7 +5787,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.MouseMotionListener
* @see #addMouseMotionListener
* @see #getMouseMotionListeners
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeMouseMotionListener(MouseMotionListener l) {
if (l == null) {
@ -6072,7 +6072,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #processEvent
* @see #disableEvents
* @see AWTEvent
* @since JDK1.1
* @since 1.1
*/
protected final void enableEvents(long eventsToEnable) {
long notifyAncestors = 0;
@ -6108,7 +6108,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* from being delivered to this component.
* @param eventsToDisable the event mask defining the event types
* @see #enableEvents
* @since JDK1.1
* @since 1.1
*/
protected final void disableEvents(long eventsToDisable) {
long notifyAncestors = 0;
@ -6285,7 +6285,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #processInputMethodEvent
* @see #processHierarchyEvent
* @see #processMouseWheelEvent
* @since JDK1.1
* @since 1.1
*/
protected void processEvent(AWTEvent e) {
if (e instanceof FocusEvent) {
@ -6351,7 +6351,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.ComponentListener
* @see #addComponentListener
* @see #enableEvents
* @since JDK1.1
* @since 1.1
*/
protected void processComponentEvent(ComponentEvent e) {
ComponentListener listener = componentListener;
@ -6414,7 +6414,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #addFocusListener
* @see #enableEvents
* @see #dispatchEvent
* @since JDK1.1
* @since 1.1
*/
protected void processFocusEvent(FocusEvent e) {
FocusListener listener = focusListener;
@ -6480,7 +6480,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #addKeyListener
* @see #enableEvents
* @see #isShowing
* @since JDK1.1
* @since 1.1
*/
protected void processKeyEvent(KeyEvent e) {
KeyListener listener = keyListener;
@ -6522,7 +6522,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.MouseListener
* @see #addMouseListener
* @see #enableEvents
* @since JDK1.1
* @since 1.1
*/
protected void processMouseEvent(MouseEvent e) {
MouseListener listener = mouseListener;
@ -6570,7 +6570,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see java.awt.event.MouseMotionListener
* @see #addMouseMotionListener
* @see #enableEvents
* @since JDK1.1
* @since 1.1
*/
protected void processMouseMotionEvent(MouseEvent e) {
MouseMotionListener listener = mouseMotionListener;
@ -6882,7 +6882,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #isDisplayable
* @see #removeNotify
* @see #invalidate
* @since JDK1.0
* @since 1.0
*/
public void addNotify() {
synchronized (getTreeLock()) {
@ -6985,7 +6985,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
*
* @see #isDisplayable
* @see #addNotify
* @since JDK1.0
* @since 1.0
*/
public void removeNotify() {
KeyboardFocusManager.clearMostRecentFocusOwner(this);
@ -7094,7 +7094,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @return <code>true</code> if this <code>Component</code> is
* focusable; <code>false</code> otherwise
* @see #setFocusable
* @since JDK1.1
* @since 1.1
* @deprecated As of 1.4, replaced by <code>isFocusable()</code>.
*/
@Deprecated
@ -7433,7 +7433,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #isFocusable
* @see #isDisplayable
* @see KeyboardFocusManager#clearGlobalFocusOwner
* @since JDK1.0
* @since 1.0
*/
public void requestFocus() {
requestFocusHelper(false, true);
@ -7862,7 +7862,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* Transfers the focus to the next component, as though this Component were
* the focus owner.
* @see #requestFocus()
* @since JDK1.1
* @since 1.1
*/
public void transferFocus() {
nextFocus();
@ -8070,7 +8070,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param popup the popup menu to be added to the component.
* @see #remove(MenuComponent)
* @exception NullPointerException if {@code popup} is {@code null}
* @since JDK1.1
* @since 1.1
*/
public void add(PopupMenu popup) {
synchronized (getTreeLock()) {
@ -8095,7 +8095,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* Removes the specified popup menu from the component.
* @param popup the popup menu to be removed
* @see #add(PopupMenu)
* @since JDK1.1
* @since 1.1
*/
@SuppressWarnings("unchecked")
public void remove(MenuComponent popup) {
@ -8126,7 +8126,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* <code>null</code>.
*
* @return a string representation of this component's state
* @since JDK1.0
* @since 1.0
*/
protected String paramString() {
final String thisName = Objects.toString(getName(), "");
@ -8140,7 +8140,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
/**
* Returns a string representation of this component and its values.
* @return a string representation of this component
* @since JDK1.0
* @since 1.0
*/
public String toString() {
return getClass().getName() + '[' + paramString() + ']';
@ -8150,7 +8150,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* Prints a listing of this component to the standard system output
* stream <code>System.out</code>.
* @see java.lang.System#out
* @since JDK1.0
* @since 1.0
*/
public void list() {
list(System.out, 0);
@ -8161,7 +8161,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* stream.
* @param out a print stream
* @throws NullPointerException if {@code out} is {@code null}
* @since JDK1.0
* @since 1.0
*/
public void list(PrintStream out) {
list(out, 0);
@ -8174,7 +8174,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param indent number of spaces to indent
* @see java.io.PrintStream#println(java.lang.Object)
* @throws NullPointerException if {@code out} is {@code null}
* @since JDK1.0
* @since 1.0
*/
public void list(PrintStream out, int indent) {
for (int i = 0 ; i < indent ; i++) {
@ -8187,7 +8187,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* Prints a listing to the specified print writer.
* @param out the print writer to print to
* @throws NullPointerException if {@code out} is {@code null}
* @since JDK1.1
* @since 1.1
*/
public void list(PrintWriter out) {
list(out, 0);
@ -8200,7 +8200,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param indent the number of spaces to indent
* @throws NullPointerException if {@code out} is {@code null}
* @see java.io.PrintStream#println(java.lang.Object)
* @since JDK1.1
* @since 1.1
*/
public void list(PrintWriter out, int indent) {
for (int i = 0 ; i < indent ; i++) {

View File

@ -85,7 +85,7 @@ import sun.security.action.GetBooleanAction;
* @see #add(java.awt.Component, int)
* @see #getComponent(int)
* @see LayoutManager
* @since JDK1.0
* @since 1.0
*/
public class Container extends Component {
@ -302,7 +302,7 @@ public class Container extends Component {
*
* @return the number of components in this panel.
* @see #getComponent
* @since JDK1.1
* @since 1.1
* @see Component#getTreeLock()
*/
public int getComponentCount() {
@ -384,7 +384,7 @@ public class Container extends Component {
* @return the insets of this container.
* @see Insets
* @see LayoutManager
* @since JDK1.1
* @since 1.1
*/
public Insets getInsets() {
return insets();
@ -975,7 +975,7 @@ public class Container extends Component {
* @see #validate
* @see javax.swing.JComponent#revalidate()
* @see LayoutManager
* @since JDK1.1
* @since 1.1
*/
public void add(Component comp, Object constraints) {
addImpl(comp, constraints, -1);
@ -1078,7 +1078,7 @@ public class Container extends Component {
* @see #invalidate
* @see LayoutManager
* @see LayoutManager2
* @since JDK1.1
* @since 1.1
*/
protected void addImpl(Component comp, Object constraints, int index) {
synchronized (getTreeLock()) {
@ -1202,7 +1202,7 @@ public class Container extends Component {
* @see #invalidate
* @see #validate
* @see #getComponentCount
* @since JDK1.1
* @since 1.1
*/
public void remove(int index) {
synchronized (getTreeLock()) {
@ -1501,7 +1501,7 @@ public class Container extends Component {
* @see LayoutManager#layoutContainer
* @see #setLayout
* @see #validate
* @since JDK1.1
* @since 1.1
*/
public void doLayout() {
layout();
@ -1749,7 +1749,7 @@ public class Container extends Component {
* @param f The font to become this container's font.
* @see Component#getFont
* @see #invalidate
* @since JDK1.0
* @since 1.0
*/
public void setFont(Font f) {
boolean shouldinvalidate = false;
@ -1834,7 +1834,7 @@ public class Container extends Component {
* @see #getLayout
* @see LayoutManager#minimumLayoutSize(Container)
* @see Component#getMinimumSize
* @since JDK1.1
* @since 1.1
*/
public Dimension getMinimumSize() {
return minimumSize();
@ -2539,7 +2539,7 @@ public class Container extends Component {
* point is within the bounds of the container the container itself
* is returned; otherwise the top-most child is returned.
* @see Component#contains
* @since JDK1.1
* @since 1.1
*/
public Component getComponentAt(int x, int y) {
return locate(x, y);
@ -2585,7 +2585,7 @@ public class Container extends Component {
* or <code>null</code> if the component does
* not contain the point.
* @see Component#contains
* @since JDK1.1
* @since 1.1
*/
public Component getComponentAt(Point p) {
return getComponentAt(p.x, p.y);
@ -2837,7 +2837,7 @@ public class Container extends Component {
* @param c the component
* @return <code>true</code> if it is an ancestor;
* <code>false</code> otherwise.
* @since JDK1.1
* @since 1.1
*/
public boolean isAncestorOf(Component c) {
Container p;
@ -3012,7 +3012,7 @@ public class Container extends Component {
* @param indent the number of spaces to indent
* @throws NullPointerException if {@code out} is {@code null}
* @see Component#list(java.io.PrintStream, int)
* @since JDK1.0
* @since 1.0
*/
public void list(PrintStream out, int indent) {
super.list(out, indent);
@ -3039,7 +3039,7 @@ public class Container extends Component {
* @param indent the number of spaces to indent
* @throws NullPointerException if {@code out} is {@code null}
* @see Component#list(java.io.PrintWriter, int)
* @since JDK1.1
* @since 1.1
*/
public void list(PrintWriter out, int indent) {
super.list(out, indent);

View File

@ -92,7 +92,7 @@ import java.security.AccessControlException;
*
* @author Sami Shaio
* @author Arthur van Hoff
* @since JDK1.0
* @since 1.0
*/
public class Dialog extends Window {

View File

@ -57,7 +57,7 @@ import java.io.*;
* <code>PGDN</code>, <code>F1</code>, <code>F2</code>, etc).
*
* @author Sami Shaio
* @since JDK1.0
* @since 1.0
*/
public class Event implements java.io.Serializable {
private transient long data;
@ -871,7 +871,7 @@ public class Event implements java.io.Serializable {
* @return a string that represents the event and the values
* of its member fields.
* @see java.awt.Event#paramString
* @since JDK1.1
* @since 1.1
*/
public String toString() {
return getClass().getName() + "[" + paramString() + "]";

View File

@ -44,7 +44,7 @@ import sun.awt.AWTAccessor;
*
* @author Sami Shaio
* @author Arthur van Hoff
* @since JDK1.0
* @since 1.0
*/
public class FileDialog extends Dialog {
@ -176,7 +176,7 @@ public class FileDialog extends Dialog {
* <code>FileDialog(parent, "", LOAD)</code>.
*
* @param parent the owner of the dialog
* @since JDK1.1
* @since 1.1
*/
public FileDialog(Frame parent) {
this(parent, "", LOAD);
@ -353,7 +353,7 @@ public class FileDialog extends Dialog {
* @see java.awt.FileDialog#getMode
* @exception IllegalArgumentException if an illegal file
* dialog mode is supplied
* @since JDK1.1
* @since 1.1
*/
public void setMode(int mode) {
switch (mode) {

View File

@ -79,7 +79,7 @@ import java.io.IOException;
*
* @author Arthur van Hoff
* @author Sami Shaio
* @since JDK1.0
* @since 1.0
* @see ComponentOrientation
*/
public class FlowLayout implements LayoutManager, java.io.Serializable {
@ -246,7 +246,7 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
* or <code>FlowLayout.TRAILING</code>.
* @return the alignment value for this layout
* @see java.awt.FlowLayout#setAlignment
* @since JDK1.1
* @since 1.1
*/
public int getAlignment() {
return newAlign;
@ -264,7 +264,7 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
* </ul>
* @param align one of the alignment values shown above
* @see #getAlignment()
* @since JDK1.1
* @since 1.1
*/
public void setAlignment(int align) {
this.newAlign = align;
@ -295,7 +295,7 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
* and between the components and the borders
* of the <code>Container</code>
* @see java.awt.FlowLayout#setHgap
* @since JDK1.1
* @since 1.1
*/
public int getHgap() {
return hgap;
@ -310,7 +310,7 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
* and between the components and the borders
* of the <code>Container</code>
* @see java.awt.FlowLayout#getHgap
* @since JDK1.1
* @since 1.1
*/
public void setHgap(int hgap) {
this.hgap = hgap;
@ -325,7 +325,7 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
* and between the components and the borders
* of the <code>Container</code>
* @see java.awt.FlowLayout#setVgap
* @since JDK1.1
* @since 1.1
*/
public int getVgap() {
return vgap;
@ -339,7 +339,7 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
* and between the components and the borders
* of the <code>Container</code>
* @see java.awt.FlowLayout#getVgap
* @since JDK1.1
* @since 1.1
*/
public void setVgap(int vgap) {
this.vgap = vgap;

View File

@ -364,7 +364,7 @@ public class Font implements java.io.Serializable
/**
* The logical name of this <code>Font</code>, as passed to the
* constructor.
* @since JDK1.0
* @since 1.0
*
* @serial
* @see #getName
@ -374,7 +374,7 @@ public class Font implements java.io.Serializable
/**
* The style of this <code>Font</code>, as passed to the constructor.
* This style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.
* @since JDK1.0
* @since 1.0
*
* @serial
* @see #getStyle()
@ -383,7 +383,7 @@ public class Font implements java.io.Serializable
/**
* The point size of this <code>Font</code>, rounded to integer.
* @since JDK1.0
* @since 1.0
*
* @serial
* @see #getSize()
@ -436,7 +436,7 @@ public class Font implements java.io.Serializable
/**
* Gets the peer of this <code>Font</code>.
* @return the peer of the <code>Font</code>.
* @since JDK1.1
* @since 1.1
* @deprecated Font rendering is now platform independent.
*/
@Deprecated
@ -562,7 +562,7 @@ public class Font implements java.io.Serializable
* @param size the point size of the {@code Font}
* @see GraphicsEnvironment#getAllFonts
* @see GraphicsEnvironment#getAvailableFontFamilyNames
* @since JDK1.0
* @since 1.0
*/
public Font(String name, int style, int size) {
this.name = (name != null) ? name : "Default";
@ -1180,7 +1180,7 @@ public class Font implements java.io.Serializable
*
* @see #getName
* @see #getFontName
* @since JDK1.1
* @since 1.1
*/
public String getFamily() {
return getFamily_NoClientCode();
@ -1240,7 +1240,7 @@ public class Font implements java.io.Serializable
* this <code>Font</code>.
* @see #getFamily
* @see #getFontName
* @since JDK1.0
* @since 1.0
*/
public String getName() {
return name;
@ -1286,7 +1286,7 @@ public class Font implements java.io.Serializable
* @see #isPlain
* @see #isBold
* @see #isItalic
* @since JDK1.0
* @since 1.0
*/
public int getStyle() {
return style;
@ -1312,7 +1312,7 @@ public class Font implements java.io.Serializable
* @see #getSize2D
* @see GraphicsConfiguration#getDefaultTransform
* @see GraphicsConfiguration#getNormalizingTransform
* @since JDK1.0
* @since 1.0
*/
public int getSize() {
return size;
@ -1337,7 +1337,7 @@ public class Font implements java.io.Serializable
* PLAIN style;
* <code>false</code> otherwise.
* @see java.awt.Font#getStyle
* @since JDK1.0
* @since 1.0
*/
public boolean isPlain() {
return style == 0;
@ -1350,7 +1350,7 @@ public class Font implements java.io.Serializable
* style is BOLD;
* <code>false</code> otherwise.
* @see java.awt.Font#getStyle
* @since JDK1.0
* @since 1.0
*/
public boolean isBold() {
return (style & BOLD) != 0;
@ -1363,7 +1363,7 @@ public class Font implements java.io.Serializable
* style is ITALIC;
* <code>false</code> otherwise.
* @see java.awt.Font#getStyle
* @since JDK1.0
* @since 1.0
*/
public boolean isItalic() {
return (style & ITALIC) != 0;
@ -1484,7 +1484,7 @@ public class Font implements java.io.Serializable
* describes, or a new default <code>Font</code> if
* <code>str</code> is <code>null</code>.
* @see #getFamily
* @since JDK1.1
* @since 1.1
*/
public static Font decode(String str) {
String fontName = str;
@ -1595,7 +1595,7 @@ public class Font implements java.io.Serializable
/**
* Returns a hashcode for this <code>Font</code>.
* @return a hashcode value for this <code>Font</code>.
* @since JDK1.0
* @since 1.0
*/
public int hashCode() {
if (hash == 0) {
@ -1622,7 +1622,7 @@ public class Font implements java.io.Serializable
* or if the argument is a <code>Font</code> object
* describing the same font as this object;
* <code>false</code> otherwise.
* @since JDK1.0
* @since 1.0
*/
public boolean equals(Object obj) {
if (obj == this) {
@ -1667,7 +1667,7 @@ public class Font implements java.io.Serializable
* representation.
* @return a <code>String</code> representation of this
* <code>Font</code> object.
* @since JDK1.0
* @since 1.0
*/
// NOTE: This method may be called by privileged threads.
// DO NOT INVOKE CLIENT CODE ON THIS THREAD!

View File

@ -94,7 +94,7 @@ import java.text.CharacterIterator;
*
* @author Jim Graham
* @see java.awt.Font
* @since JDK1.0
* @since 1.0
*/
public abstract class FontMetrics implements java.io.Serializable {
@ -625,7 +625,6 @@ public abstract class FontMetrics implements java.io.Serializable {
* object's values as a <code>String</code>.
* @return a <code>String</code> representation of this
* <code>FontMetrics</code> object.
* @since JDK1.0.
*/
public String toString() {
return getClass().getName() +

View File

@ -130,7 +130,7 @@ import javax.accessibility.*;
* @author Sami Shaio
* @see WindowEvent
* @see Window#addWindowListener
* @since JDK1.0
* @since 1.0
*/
public class Frame extends Window implements MenuContainer {

View File

@ -99,7 +99,7 @@ import java.text.AttributedCharacterIterator;
* @see java.awt.Graphics#setPaintMode()
* @see java.awt.Graphics#setXORMode(java.awt.Color)
* @see java.awt.Graphics#setFont(java.awt.Font)
* @since JDK1.0
* @since 1.0
*/
public abstract class Graphics {
@ -283,7 +283,7 @@ public abstract class Graphics {
* @see java.awt.Graphics#clipRect
* @see java.awt.Graphics#setClip(int, int, int, int)
* @see java.awt.Graphics#setClip(Shape)
* @since JDK1.1
* @since 1.1
*/
public abstract Rectangle getClipBounds();
@ -321,7 +321,7 @@ public abstract class Graphics {
* @see java.awt.Graphics#clipRect
* @see java.awt.Graphics#setClip(Shape)
* @see java.awt.Graphics#getClip
* @since JDK1.1
* @since 1.1
*/
public abstract void setClip(int x, int y, int width, int height);
@ -339,7 +339,7 @@ public abstract class Graphics {
* @see java.awt.Graphics#clipRect
* @see java.awt.Graphics#setClip(int, int, int, int)
* @see java.awt.Graphics#setClip(Shape)
* @since JDK1.1
* @since 1.1
*/
public abstract Shape getClip();
@ -357,7 +357,7 @@ public abstract class Graphics {
* @see java.awt.Graphics#getClip()
* @see java.awt.Graphics#clipRect
* @see java.awt.Graphics#setClip(int, int, int, int)
* @since JDK1.1
* @since 1.1
*/
public abstract void setClip(Shape clip);
@ -694,7 +694,7 @@ public abstract class Graphics {
* @param yPoints an array of <i>y</i> points
* @param nPoints the total number of points
* @see java.awt.Graphics#drawPolygon(int[], int[], int)
* @since JDK1.1
* @since 1.1
*/
public abstract void drawPolyline(int xPoints[], int yPoints[],
int nPoints);
@ -1058,7 +1058,7 @@ public abstract class Graphics {
* @see java.awt.Image
* @see java.awt.image.ImageObserver
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
* @since JDK1.1
* @since 1.1
*/
public abstract boolean drawImage(Image img,
int dx1, int dy1, int dx2, int dy2,
@ -1119,7 +1119,7 @@ public abstract class Graphics {
* @see java.awt.Image
* @see java.awt.image.ImageObserver
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
* @since JDK1.1
* @since 1.1
*/
public abstract boolean drawImage(Image img,
int dx1, int dy1, int dx2, int dy2,

View File

@ -662,7 +662,7 @@ public abstract class Graphics2D extends Graphics {
* <code>null</code>
* @see java.awt.Graphics#drawBytes
* @see java.awt.Graphics#drawChars
* @since JDK1.0
* @since 1.0
*/
public abstract void drawString(String str, int x, int y);
@ -968,7 +968,7 @@ public abstract class Graphics2D extends Graphics {
* context are relative to this new origin.
* @param x the specified x coordinate
* @param y the specified y coordinate
* @since JDK1.0
* @since 1.0
*/
public abstract void translate(int x, int y);

View File

@ -32,7 +32,7 @@ package java.awt;
* @author Doug Stein
* @author Bill Spitzak (orignial NeWS &amp; OLIT implementation)
* @see java.awt.GridBagLayout
* @since JDK1.0
* @since 1.0
*/
public class GridBagConstraints implements Cloneable, java.io.Serializable {

View File

@ -359,7 +359,7 @@ import java.util.Arrays;
* @see java.awt.GridBagConstraints
* @see java.awt.GridBagLayoutInfo
* @see java.awt.ComponentOrientation
* @since JDK1.0
* @since 1.0
*/
public class GridBagLayout implements LayoutManager2,
java.io.Serializable {
@ -562,7 +562,7 @@ java.io.Serializable {
* @return the graphics origin of the cell in the top-left
* corner of the layout grid
* @see java.awt.ComponentOrientation
* @since JDK1.1
* @since 1.1
*/
public Point getLayoutOrigin () {
Point origin = new Point(0,0);
@ -580,7 +580,7 @@ java.io.Serializable {
* @return an array of two arrays, containing the widths
* of the layout columns and
* the heights of the layout rows
* @since JDK1.1
* @since 1.1
*/
public int [][] getLayoutDimensions () {
if (layoutInfo == null)
@ -606,7 +606,7 @@ java.io.Serializable {
* @return an array of two arrays, representing the
* horizontal weights of the layout columns
* and the vertical weights of the layout rows
* @since JDK1.1
* @since 1.1
*/
public double [][] getLayoutWeights () {
if (layoutInfo == null)
@ -647,7 +647,7 @@ java.io.Serializable {
* in the layout grid contains the point
* (<i>x</i>,&nbsp;<i>y</i>).
* @see java.awt.ComponentOrientation
* @since JDK1.1
* @since 1.1
*/
public Point location(int x, int y) {
Point loc = new Point(0,0);

View File

@ -62,7 +62,7 @@ public class GridBagLayoutInfo implements java.io.Serializable {
* grid cells with it's own parameters.
* @param width the columns
* @param height the rows
* @since 6.0
* @since 1.6
*/
GridBagLayoutInfo(int width, int height) {
this.width = width;

View File

@ -88,7 +88,7 @@ package java.awt;
* number of rows is set to zero.
*
* @author Arthur van Hoff
* @since JDK1.0
* @since 1.0
*/
public class GridLayout implements LayoutManager, java.io.Serializable {
/*
@ -144,7 +144,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable {
/**
* Creates a grid layout with a default of one column per component,
* in a single row.
* @since JDK1.1
* @since 1.1
*/
public GridLayout() {
this(1, 0, 0, 0);
@ -203,7 +203,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable {
/**
* Gets the number of rows in this layout.
* @return the number of rows in this layout
* @since JDK1.1
* @since 1.1
*/
public int getRows() {
return rows;
@ -214,7 +214,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable {
* @param rows the number of rows in this layout
* @exception IllegalArgumentException if the value of both
* <code>rows</code> and <code>cols</code> is set to zero
* @since JDK1.1
* @since 1.1
*/
public void setRows(int rows) {
if ((rows == 0) && (this.cols == 0)) {
@ -226,7 +226,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable {
/**
* Gets the number of columns in this layout.
* @return the number of columns in this layout
* @since JDK1.1
* @since 1.1
*/
public int getColumns() {
return cols;
@ -242,7 +242,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable {
* @param cols the number of columns in this layout
* @exception IllegalArgumentException if the value of both
* <code>rows</code> and <code>cols</code> is set to zero
* @since JDK1.1
* @since 1.1
*/
public void setColumns(int cols) {
if ((cols == 0) && (this.rows == 0)) {
@ -254,7 +254,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable {
/**
* Gets the horizontal gap between components.
* @return the horizontal gap between components
* @since JDK1.1
* @since 1.1
*/
public int getHgap() {
return hgap;
@ -263,7 +263,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable {
/**
* Sets the horizontal gap between components to the specified value.
* @param hgap the horizontal gap between components
* @since JDK1.1
* @since 1.1
*/
public void setHgap(int hgap) {
this.hgap = hgap;
@ -272,7 +272,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable {
/**
* Gets the vertical gap between components.
* @return the vertical gap between components
* @since JDK1.1
* @since 1.1
*/
public int getVgap() {
return vgap;
@ -281,7 +281,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable {
/**
* Sets the vertical gap between components to the specified value.
* @param vgap the vertical gap between components
* @since JDK1.1
* @since 1.1
*/
public void setVgap(int vgap) {
this.vgap = vgap;

View File

@ -41,7 +41,7 @@ import sun.awt.image.SurfaceManager;
*
* @author Sami Shaio
* @author Arthur van Hoff
* @since JDK1.0
* @since 1.0
*/
public abstract class Image {
@ -164,7 +164,7 @@ public abstract class Image {
* @see java.awt.Image#SCALE_SMOOTH
* @see java.awt.Image#SCALE_REPLICATE
* @see java.awt.Image#SCALE_AREA_AVERAGING
* @since JDK1.1
* @since 1.1
*/
public Image getScaledInstance(int width, int height, int hints) {
ImageFilter filter;
@ -180,21 +180,21 @@ public abstract class Image {
/**
* Use the default image-scaling algorithm.
* @since JDK1.1
* @since 1.1
*/
public static final int SCALE_DEFAULT = 1;
/**
* Choose an image-scaling algorithm that gives higher priority
* to scaling speed than smoothness of the scaled image.
* @since JDK1.1
* @since 1.1
*/
public static final int SCALE_FAST = 2;
/**
* Choose an image-scaling algorithm that gives higher priority
* to image smoothness than scaling speed.
* @since JDK1.1
* @since 1.1
*/
public static final int SCALE_SMOOTH = 4;
@ -205,7 +205,7 @@ public abstract class Image {
* that performs the same algorithm yet integrates more efficiently
* into the imaging infrastructure supplied by the toolkit.
* @see java.awt.image.ReplicateScaleFilter
* @since JDK1.1
* @since 1.1
*/
public static final int SCALE_REPLICATE = 8;
@ -215,7 +215,7 @@ public abstract class Image {
* performs the same algorithm yet integrates more efficiently
* into the image infrastructure supplied by the toolkit.
* @see java.awt.image.AreaAveragingScaleFilter
* @since JDK1.1
* @since 1.1
*/
public static final int SCALE_AREA_AVERAGING = 16;

View File

@ -35,7 +35,7 @@ package java.awt;
* @author Sami Shaio
* @see java.awt.LayoutManager
* @see java.awt.Container
* @since JDK1.0
* @since 1.0
*/
public class Insets implements Cloneable, java.io.Serializable {
@ -130,7 +130,7 @@ public class Insets implements Cloneable, java.io.Serializable {
* <code>bottom</code>, and <code>right</code> are all equal.
* @return <code>true</code> if the two insets are equal;
* otherwise <code>false</code>.
* @since JDK1.1
* @since 1.1
*/
public boolean equals(Object obj) {
if (obj instanceof Insets) {

View File

@ -49,7 +49,7 @@ import javax.accessibility.*;
* style="float:center; margin: 7px 10px;">
*
* @author Sami Shaio
* @since JDK1.0
* @since 1.0
*/
public class Label extends Component implements Accessible {
@ -73,7 +73,6 @@ public class Label extends Component implements Accessible {
/**
* Indicates that the label should be right justified.
* @since JDK1.0t.
*/
public static final int RIGHT = 2;

View File

@ -104,7 +104,7 @@ import javax.accessibility.*;
* @see java.awt.event.ItemListener
* @see java.awt.event.ActionEvent
* @see java.awt.event.ActionListener
* @since JDK1.0
* @since 1.0
*/
public class List extends Component implements ItemSelectable, Accessible {
/**
@ -199,7 +199,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true.
* @see java.awt.GraphicsEnvironment#isHeadless
* @since JDK1.1
* @since 1.1
*/
public List(int rows) throws HeadlessException {
this(rows, false);
@ -275,7 +275,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* Gets the number of items in the list.
* @return the number of items in the list
* @see #getItem
* @since JDK1.1
* @since 1.1
*/
public int getItemCount() {
return countItems();
@ -315,7 +315,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @see #select
* @see #deselect
* @see #isIndexSelected
* @since JDK1.1
* @since 1.1
*/
public synchronized String[] getItems() {
String itemCopies[] = new String[items.size()];
@ -326,7 +326,7 @@ public class List extends Component implements ItemSelectable, Accessible {
/**
* Adds the specified item to the end of scrolling list.
* @param item the item to be added
* @since JDK1.1
* @since 1.1
*/
public void add(String item) {
addItem(item);
@ -351,7 +351,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* if this parameter is <code>null</code> then the item is
* treated as an empty string, <code>""</code>
* @param index the position at which to add the item
* @since JDK1.1
* @since 1.1
*/
public void add(String item, int index) {
addItem(item, index);
@ -399,7 +399,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* Removes all items from this list.
* @see #remove
* @see #delItems
* @since JDK1.1
* @since 1.1
*/
public void removeAll() {
clear();
@ -426,7 +426,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @param item the item to remove from the list
* @exception IllegalArgumentException
* if the item doesn't exist in the list
* @since JDK1.1
* @since 1.1
*/
public synchronized void remove(String item) {
int index = items.indexOf(item);
@ -445,7 +445,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* only selected item in the list, the list is set to have no selection.
* @param position the index of the item to delete
* @see #add(String, int)
* @since JDK1.1
* @since 1.1
* @exception ArrayIndexOutOfBoundsException
* if the <code>position</code> is less than 0 or
* greater than <code>getItemCount()-1</code>
@ -639,7 +639,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* selected; <code>false</code> otherwise
* @see #select
* @see #deselect
* @since JDK1.1
* @since 1.1
*/
public boolean isIndexSelected(int index) {
return isSelected(index);
@ -675,7 +675,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @return <code>true</code> if this list allows multiple
* selections; otherwise, <code>false</code>
* @see #setMultipleMode
* @since JDK1.1
* @since 1.1
*/
public boolean isMultipleMode() {
return allowsMultipleSelections();
@ -702,7 +702,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* are allowed; otherwise, only one item from
* the list can be selected at once
* @see #isMultipleMode
* @since JDK1.1
* @since 1.1
*/
public void setMultipleMode(boolean b) {
setMultipleSelections(b);
@ -753,7 +753,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @return the preferred dimensions for displaying this scrolling list
* given that the specified number of rows must be visible
* @see java.awt.Component#getPreferredSize
* @since JDK1.1
* @since 1.1
*/
public Dimension getPreferredSize(int rows) {
return preferredSize(rows);
@ -777,7 +777,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* Gets the preferred size of this scrolling list.
* @return the preferred dimensions for displaying this scrolling list
* @see java.awt.Component#getPreferredSize
* @since JDK1.1
* @since 1.1
*/
public Dimension getPreferredSize() {
return preferredSize();
@ -803,7 +803,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @return the minimum dimensions for displaying this scrolling list
* given that the specified number of rows must be visible
* @see java.awt.Component#getMinimumSize
* @since JDK1.1
* @since 1.1
*/
public Dimension getMinimumSize(int rows) {
return minimumSize(rows);
@ -828,7 +828,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @return the minimum dimensions needed
* to display this scrolling list
* @see java.awt.Component#getMinimumSize()
* @since JDK1.1
* @since 1.1
*/
public Dimension getMinimumSize() {
return minimumSize();
@ -861,7 +861,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @see #deselect
* @see java.awt.event.ItemEvent
* @see java.awt.event.ItemListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void addItemListener(ItemListener l) {
if (l == null) {
@ -884,7 +884,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @see #getItemListeners
* @see java.awt.event.ItemEvent
* @see java.awt.event.ItemListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeItemListener(ItemListener l) {
if (l == null) {
@ -927,7 +927,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @see #getActionListeners
* @see java.awt.event.ActionEvent
* @see java.awt.event.ActionListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void addActionListener(ActionListener l) {
if (l == null) {
@ -951,7 +951,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @see #getActionListeners
* @see java.awt.event.ActionEvent
* @see java.awt.event.ActionListener
* @since JDK1.1
* @since 1.1
*/
public synchronized void removeActionListener(ActionListener l) {
if (l == null) {
@ -1061,7 +1061,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @see java.awt.event.ItemEvent
* @see #processActionEvent
* @see #processItemEvent
* @since JDK1.1
* @since 1.1
*/
protected void processEvent(AWTEvent e) {
if (e instanceof ItemEvent) {
@ -1096,7 +1096,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @see java.awt.event.ItemListener
* @see #addItemListener
* @see java.awt.Component#enableEvents
* @since JDK1.1
* @since 1.1
*/
protected void processItemEvent(ItemEvent e) {
ItemListener listener = itemListener;
@ -1127,7 +1127,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* @see java.awt.event.ActionListener
* @see #addActionListener
* @see java.awt.Component#enableEvents
* @since JDK1.1
* @since 1.1
*/
protected void processActionEvent(ActionEvent e) {
ActionListener listener = actionListener;

Some files were not shown because too many files have changed in this diff Show More