|
From: <ls...@us...> - 2007-05-13 17:10:32
|
Revision: 3199
http://jnode.svn.sourceforge.net/jnode/?rev=3199&view=rev
Author: lsantha
Date: 2007-05-13 10:10:31 -0700 (Sun, 13 May 2007)
Log Message:
-----------
First merges of OpenJDK.
Added Paths:
-----------
trunk/core/src/openjdk/sun/
trunk/core/src/openjdk/sun/sun/
trunk/core/src/openjdk/sun/sun/security/
trunk/core/src/openjdk/sun/sun/security/action/
trunk/core/src/openjdk/sun/sun/security/action/GetPropertyAction.java
Added: trunk/core/src/openjdk/sun/sun/security/action/GetPropertyAction.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/security/action/GetPropertyAction.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/security/action/GetPropertyAction.java 2007-05-13 17:10:31 UTC (rev 3199)
@@ -0,0 +1,88 @@
+/*
+ * Copyright 1998-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.security.action;
+
+/**
+ * A convenience class for retrieving the string value of a system
+ * property as a privileged action.
+ *
+ * <p>An instance of this class can be used as the argument of
+ * <code>AccessController.doPrivileged</code>.
+ *
+ * <p>The following code retrieves the value of the system
+ * property named <code>"prop"</code> as a privileged action: <p>
+ *
+ * <pre>
+ * String s = java.security.AccessController.doPrivileged
+ * (new GetPropertyAction("prop"));
+ * </pre>
+ *
+ * @author Roland Schemers
+ * @version 1.18, 05/05/07
+ * @see java.security.PrivilegedAction
+ * @see java.security.AccessController
+ * @since 1.2
+ */
+
+public class GetPropertyAction
+ implements java.security.PrivilegedAction<String> {
+ private String theProp;
+ private String defaultVal;
+
+ /**
+ * Constructor that takes the name of the system property whose
+ * string value needs to be determined.
+ *
+ * @param theProp the name of the system property.
+ */
+ public GetPropertyAction(String theProp) {
+ this.theProp = theProp;
+ }
+
+ /**
+ * Constructor that takes the name of the system property and the default
+ * value of that property.
+ *
+ * @param theProp the name of the system property.
+ * @param defaulVal the default value.
+ */
+ public GetPropertyAction(String theProp, String defaultVal) {
+ this.theProp = theProp;
+ this.defaultVal = defaultVal;
+ }
+
+ /**
+ * Determines the string value of the system property whose
+ * name was specified in the constructor.
+ *
+ * @return the string value of the system property,
+ * or the default value if there is no property with that key.
+ */
+ public String run() {
+ String value = System.getProperty(theProp);
+ return (value == null) ? defaultVal : value;
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2007-05-17 16:56:21
|
Revision: 3208
http://jnode.svn.sourceforge.net/jnode/?rev=3208&view=rev
Author: lsantha
Date: 2007-05-17 09:56:12 -0700 (Thu, 17 May 2007)
Log Message:
-----------
Openjdk patches.
Added Paths:
-----------
trunk/core/src/openjdk/java/java/ustil/
trunk/core/src/openjdk/vm/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2007-06-10 12:27:18
|
Revision: 3240
http://jnode.svn.sourceforge.net/jnode/?rev=3240&view=rev
Author: lsantha
Date: 2007-06-10 05:27:16 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
javac integration from openjdk in progress.
Added Paths:
-----------
trunk/core/src/openjdk/com/
trunk/core/src/openjdk/com/com/
trunk/core/src/openjdk/com/com/sun/
trunk/core/src/openjdk/com/com/sun/mirror/
trunk/core/src/openjdk/com/com/sun/mirror/apt/
trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessor.java
trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessorEnvironment.java
trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessorFactory.java
trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessorListener.java
trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessors.java
trunk/core/src/openjdk/com/com/sun/mirror/apt/Filer.java
trunk/core/src/openjdk/com/com/sun/mirror/apt/Messager.java
trunk/core/src/openjdk/com/com/sun/mirror/apt/RoundCompleteEvent.java
trunk/core/src/openjdk/com/com/sun/mirror/apt/RoundCompleteListener.java
trunk/core/src/openjdk/com/com/sun/mirror/apt/RoundState.java
trunk/core/src/openjdk/com/com/sun/mirror/apt/package.html
trunk/core/src/openjdk/com/com/sun/mirror/declaration/
trunk/core/src/openjdk/com/com/sun/mirror/declaration/AnnotationMirror.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/AnnotationTypeDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/AnnotationTypeElementDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/AnnotationValue.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/ClassDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/ConstructorDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/Declaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/EnumConstantDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/EnumDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/ExecutableDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/FieldDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/InterfaceDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/MemberDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/MethodDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/Modifier.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/PackageDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/ParameterDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/TypeDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/TypeParameterDeclaration.java
trunk/core/src/openjdk/com/com/sun/mirror/declaration/package.html
trunk/core/src/openjdk/com/com/sun/mirror/overview.html
trunk/core/src/openjdk/com/com/sun/mirror/type/
trunk/core/src/openjdk/com/com/sun/mirror/type/AnnotationType.java
trunk/core/src/openjdk/com/com/sun/mirror/type/ArrayType.java
trunk/core/src/openjdk/com/com/sun/mirror/type/ClassType.java
trunk/core/src/openjdk/com/com/sun/mirror/type/DeclaredType.java
trunk/core/src/openjdk/com/com/sun/mirror/type/EnumType.java
trunk/core/src/openjdk/com/com/sun/mirror/type/InterfaceType.java
trunk/core/src/openjdk/com/com/sun/mirror/type/MirroredTypeException.java
trunk/core/src/openjdk/com/com/sun/mirror/type/MirroredTypesException.java
trunk/core/src/openjdk/com/com/sun/mirror/type/PrimitiveType.java
trunk/core/src/openjdk/com/com/sun/mirror/type/ReferenceType.java
trunk/core/src/openjdk/com/com/sun/mirror/type/TypeMirror.java
trunk/core/src/openjdk/com/com/sun/mirror/type/TypeVariable.java
trunk/core/src/openjdk/com/com/sun/mirror/type/VoidType.java
trunk/core/src/openjdk/com/com/sun/mirror/type/WildcardType.java
trunk/core/src/openjdk/com/com/sun/mirror/type/package.html
trunk/core/src/openjdk/com/com/sun/mirror/util/
trunk/core/src/openjdk/com/com/sun/mirror/util/DeclarationFilter.java
trunk/core/src/openjdk/com/com/sun/mirror/util/DeclarationScanner.java
trunk/core/src/openjdk/com/com/sun/mirror/util/DeclarationVisitor.java
trunk/core/src/openjdk/com/com/sun/mirror/util/DeclarationVisitors.java
trunk/core/src/openjdk/com/com/sun/mirror/util/Declarations.java
trunk/core/src/openjdk/com/com/sun/mirror/util/SimpleDeclarationVisitor.java
trunk/core/src/openjdk/com/com/sun/mirror/util/SimpleTypeVisitor.java
trunk/core/src/openjdk/com/com/sun/mirror/util/SourceOrderDeclScanner.java
trunk/core/src/openjdk/com/com/sun/mirror/util/SourcePosition.java
trunk/core/src/openjdk/com/com/sun/mirror/util/TypeVisitor.java
trunk/core/src/openjdk/com/com/sun/mirror/util/Types.java
trunk/core/src/openjdk/com/com/sun/mirror/util/package.html
trunk/core/src/openjdk/com/com/sun/source/
trunk/core/src/openjdk/com/com/sun/source/tree/
trunk/core/src/openjdk/com/com/sun/source/tree/AnnotationTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ArrayAccessTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ArrayTypeTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/AssertTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/AssignmentTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/BinaryTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/BlockTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/BreakTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/CaseTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/CatchTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ClassTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/CompilationUnitTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/CompoundAssignmentTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ConditionalExpressionTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ContinueTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/DoWhileLoopTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/EmptyStatementTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/EnhancedForLoopTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ErroneousTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ExpressionStatementTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ExpressionTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ForLoopTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/IdentifierTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/IfTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ImportTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/InstanceOfTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/LabeledStatementTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/LineMap.java
trunk/core/src/openjdk/com/com/sun/source/tree/LiteralTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/MemberSelectTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/MethodInvocationTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/MethodTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ModifiersTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/NewArrayTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/NewClassTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ParameterizedTypeTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ParenthesizedTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/PrimitiveTypeTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ReturnTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/Scope.java
trunk/core/src/openjdk/com/com/sun/source/tree/StatementTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/SwitchTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/SynchronizedTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/ThrowTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/Tree.java
trunk/core/src/openjdk/com/com/sun/source/tree/TreeVisitor.java
trunk/core/src/openjdk/com/com/sun/source/tree/TryTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/TypeCastTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/TypeParameterTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/UnaryTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/VariableTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/WhileLoopTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/WildcardTree.java
trunk/core/src/openjdk/com/com/sun/source/tree/package-info.java
trunk/core/src/openjdk/com/com/sun/source/util/
trunk/core/src/openjdk/com/com/sun/source/util/JavacTask.java
trunk/core/src/openjdk/com/com/sun/source/util/SimpleTreeVisitor.java
trunk/core/src/openjdk/com/com/sun/source/util/SourcePositions.java
trunk/core/src/openjdk/com/com/sun/source/util/TaskEvent.java
trunk/core/src/openjdk/com/com/sun/source/util/TaskListener.java
trunk/core/src/openjdk/com/com/sun/source/util/TreePath.java
trunk/core/src/openjdk/com/com/sun/source/util/TreePathScanner.java
trunk/core/src/openjdk/com/com/sun/source/util/TreeScanner.java
trunk/core/src/openjdk/com/com/sun/source/util/Trees.java
trunk/core/src/openjdk/com/com/sun/source/util/package-info.java
trunk/core/src/openjdk/com/com/sun/tools/
trunk/core/src/openjdk/com/com/sun/tools/apt/
trunk/core/src/openjdk/com/com/sun/tools/apt/Main.java
trunk/core/src/openjdk/com/com/sun/tools/apt/comp/
trunk/core/src/openjdk/com/com/sun/tools/apt/comp/AnnotationProcessingError.java
trunk/core/src/openjdk/com/com/sun/tools/apt/comp/Apt.java
trunk/core/src/openjdk/com/com/sun/tools/apt/comp/BootstrapAPF.java
trunk/core/src/openjdk/com/com/sun/tools/apt/comp/PrintAP.java
trunk/core/src/openjdk/com/com/sun/tools/apt/comp/UsageMessageNeededException.java
trunk/core/src/openjdk/com/com/sun/tools/apt/main/
trunk/core/src/openjdk/com/com/sun/tools/apt/main/CommandLine.java
trunk/core/src/openjdk/com/com/sun/tools/apt/main/JavaCompiler.java
trunk/core/src/openjdk/com/com/sun/tools/apt/main/Main.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/AptEnv.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/apt/
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/apt/AnnotationProcessorEnvironmentImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/apt/FilerImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/apt/MessagerImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/apt/RoundCompleteEventImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/apt/RoundStateImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/AnnotationMirrorImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/AnnotationTypeDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/AnnotationTypeElementDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/AnnotationValueImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/ClassDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/Constants.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/ConstructorDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/DeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/DeclarationMaker.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/EnumConstantDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/EnumDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/ExecutableDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/FieldDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/InterfaceDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/MemberDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/MethodDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/PackageDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/ParameterDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/TypeDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/declaration/TypeParameterDeclarationImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/AnnotationTypeImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/ArrayTypeImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/ClassTypeImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/DeclaredTypeImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/EnumTypeImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/InterfaceTypeImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/PrimitiveTypeImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/TypeMaker.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/TypeMirrorImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/TypeVariableImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/VoidTypeImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/type/WildcardTypeImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/util/
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/util/DeclarationsImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/util/SourcePositionImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/mirror/util/TypesImpl.java
trunk/core/src/openjdk/com/com/sun/tools/apt/resources/
trunk/core/src/openjdk/com/com/sun/tools/apt/resources/apt.properties
trunk/core/src/openjdk/com/com/sun/tools/apt/resources/apt_ja.properties
trunk/core/src/openjdk/com/com/sun/tools/apt/resources/apt_zh_CN.properties
trunk/core/src/openjdk/com/com/sun/tools/apt/util/
trunk/core/src/openjdk/com/com/sun/tools/apt/util/Bark.java
trunk/core/src/openjdk/com/com/sun/tools/javac/
trunk/core/src/openjdk/com/com/sun/tools/javac/Launcher.java
trunk/core/src/openjdk/com/com/sun/tools/javac/Main.java
trunk/core/src/openjdk/com/com/sun/tools/javac/Server.java
trunk/core/src/openjdk/com/com/sun/tools/javac/api/
trunk/core/src/openjdk/com/com/sun/tools/javac/api/JavacScope.java
trunk/core/src/openjdk/com/com/sun/tools/javac/api/JavacTaskImpl.java
trunk/core/src/openjdk/com/com/sun/tools/javac/api/JavacTool.java
trunk/core/src/openjdk/com/com/sun/tools/javac/api/JavacTrees.java
trunk/core/src/openjdk/com/com/sun/tools/javac/api/WrappingJavaFileManager.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/
trunk/core/src/openjdk/com/com/sun/tools/javac/code/Attribute.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/BoundKind.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/Flags.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/Kinds.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/Lint.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/Scope.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/Source.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/Symbol.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/Symtab.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/Type.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/TypeTags.java
trunk/core/src/openjdk/com/com/sun/tools/javac/code/Types.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/Annotate.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/Attr.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/AttrContext.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/AttrContextEnv.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/Check.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/ConstFold.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/Enter.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/Env.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/Flow.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/Infer.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/Lower.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/MemberEnter.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/Resolve.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/Todo.java
trunk/core/src/openjdk/com/com/sun/tools/javac/comp/TransTypes.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/ByteCodes.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/CRTFlags.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/CRTable.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/ClassFile.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/ClassReader.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/ClassWriter.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/Code.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/Gen.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/Items.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/Pool.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/Target.java
trunk/core/src/openjdk/com/com/sun/tools/javac/jvm/UninitializedType.java
trunk/core/src/openjdk/com/com/sun/tools/javac/main/
trunk/core/src/openjdk/com/com/sun/tools/javac/main/CommandLine.java
trunk/core/src/openjdk/com/com/sun/tools/javac/main/JavaCompiler.java
trunk/core/src/openjdk/com/com/sun/tools/javac/main/JavacOption.java
trunk/core/src/openjdk/com/com/sun/tools/javac/main/Main.java
trunk/core/src/openjdk/com/com/sun/tools/javac/main/OptionName.java
trunk/core/src/openjdk/com/com/sun/tools/javac/main/RecognizedOptions.java
trunk/core/src/openjdk/com/com/sun/tools/javac/model/
trunk/core/src/openjdk/com/com/sun/tools/javac/model/AnnotationProxyMaker.java
trunk/core/src/openjdk/com/com/sun/tools/javac/model/FilteredMemberList.java
trunk/core/src/openjdk/com/com/sun/tools/javac/model/JavacElements.java
trunk/core/src/openjdk/com/com/sun/tools/javac/model/JavacSourcePosition.java
trunk/core/src/openjdk/com/com/sun/tools/javac/model/JavacTypes.java
trunk/core/src/openjdk/com/com/sun/tools/javac/parser/
trunk/core/src/openjdk/com/com/sun/tools/javac/parser/DocCommentScanner.java
trunk/core/src/openjdk/com/com/sun/tools/javac/parser/EndPosParser.java
trunk/core/src/openjdk/com/com/sun/tools/javac/parser/Keywords.java
trunk/core/src/openjdk/com/com/sun/tools/javac/parser/Lexer.java
trunk/core/src/openjdk/com/com/sun/tools/javac/parser/Parser.java
trunk/core/src/openjdk/com/com/sun/tools/javac/parser/Scanner.java
trunk/core/src/openjdk/com/com/sun/tools/javac/parser/Token.java
trunk/core/src/openjdk/com/com/sun/tools/javac/processing/
trunk/core/src/openjdk/com/com/sun/tools/javac/processing/AnnotationProcessingError.java
trunk/core/src/openjdk/com/com/sun/tools/javac/processing/JavacFiler.java
trunk/core/src/openjdk/com/com/sun/tools/javac/processing/JavacMessager.java
trunk/core/src/openjdk/com/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
trunk/core/src/openjdk/com/com/sun/tools/javac/processing/JavacRoundEnvironment.java
trunk/core/src/openjdk/com/com/sun/tools/javac/processing/PrintingProcessor.java
trunk/core/src/openjdk/com/com/sun/tools/javac/processing/ServiceProxy.java
trunk/core/src/openjdk/com/com/sun/tools/javac/resources/
trunk/core/src/openjdk/com/com/sun/tools/javac/resources/compiler.properties
trunk/core/src/openjdk/com/com/sun/tools/javac/resources/compiler_ja.properties
trunk/core/src/openjdk/com/com/sun/tools/javac/resources/compiler_zh_CN.properties
trunk/core/src/openjdk/com/com/sun/tools/javac/resources/javac.properties
trunk/core/src/openjdk/com/com/sun/tools/javac/resources/javac_ja.properties
trunk/core/src/openjdk/com/com/sun/tools/javac/resources/javac_zh_CN.properties
trunk/core/src/openjdk/com/com/sun/tools/javac/resources/legacy.properties
trunk/core/src/openjdk/com/com/sun/tools/javac/resources/version-template.java
trunk/core/src/openjdk/com/com/sun/tools/javac/services/
trunk/core/src/openjdk/com/com/sun/tools/javac/services/javax.tools.JavaCompilerTool
trunk/core/src/openjdk/com/com/sun/tools/javac/sym/
trunk/core/src/openjdk/com/com/sun/tools/javac/sym/CreateSymbols.java
trunk/core/src/openjdk/com/com/sun/tools/javac/tree/
trunk/core/src/openjdk/com/com/sun/tools/javac/tree/JCTree.java
trunk/core/src/openjdk/com/com/sun/tools/javac/tree/Pretty.java
trunk/core/src/openjdk/com/com/sun/tools/javac/tree/TreeCopier.java
trunk/core/src/openjdk/com/com/sun/tools/javac/tree/TreeInfo.java
trunk/core/src/openjdk/com/com/sun/tools/javac/tree/TreeMaker.java
trunk/core/src/openjdk/com/com/sun/tools/javac/tree/TreeScanner.java
trunk/core/src/openjdk/com/com/sun/tools/javac/tree/TreeTranslator.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Abort.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/BaseFileObject.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Bits.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/ByteBuffer.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/ClientCodeException.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Constants.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Context.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Convert.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/DiagnosticFormatter.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/FatalError.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/JCDiagnostic.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/JavacFileManager.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/LayoutCharacters.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/List.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/ListBuffer.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Log.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/MandatoryWarningHandler.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Messages.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Name.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Old199.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Options.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Pair.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Paths.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Position.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/PropagatedException.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Version.java
trunk/core/src/openjdk/com/com/sun/tools/javac/util/Warner.java
Added: trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessor.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessor.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessor.java 2007-06-10 12:27:16 UTC (rev 3240)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.mirror.apt;
+
+
+import java.io.IOException;
+import java.util.Collection;
+
+
+/**
+ * An annotation processor, used to examine and process the
+ * annotations of program elements. An annotation processor may,
+ * for example, create new source files and XML documents to be used
+ * in conjunction with the original code.
+ *
+ * <p> An annotation processor is constructed by a
+ * {@linkplain AnnotationProcessorFactory factory}, which provides it with an
+ * {@linkplain AnnotationProcessorEnvironment environment} that
+ * encapsulates the state it needs.
+ * Messages regarding warnings and errors encountered during processing
+ * should be directed to the environment's {@link Messager},
+ * and new files may be created using the environment's {@link Filer}.
+ *
+ * <p> Each annotation processor is created to process annotations
+ * of a particular annotation type or set of annotation types.
+ * It may use its environment to find the program elements with
+ * annotations of those types. It may freely examine any other program
+ * elements in the course of its processing.
+ *
+ * @author Joseph D. Darcy
+ * @author Scott Seligman
+ * @version 1.9 07/05/05
+ * @since 1.5
+ */
+
+public interface AnnotationProcessor {
+
+ /**
+ * Process all program elements supported by this annotation processor.
+ */
+ void process();
+}
Added: trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessorEnvironment.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessorEnvironment.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/mirror/apt/AnnotationProcessorEnvironment.java 2007-06-10 12:27:16 UTC (rev 3240)
@@ -0,0 +1,178 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.mirror.apt;
+
+
+import java.util.Collection;
+import java.util.Map;
+
+import com.sun.mirror.declaration.*;
+import com.sun.mirror.util.*;
+
+
+/**
+ * The environment encapsulating the state needed by an annotation processor.
+ * An annotation processing tool makes this environment available
+ * to all annotation processors.
+ *
+ * <p> When an annotation processing tool is invoked, it is given a
+ * set of type declarations on which to operate. These
+ * are refered to as the <i>specified</i> types.
+ * The type declarations said to be <i>included</i> in this invocation
+ * consist of the specified types and any types nested within them.
+ *
+ * <p> {@link DeclarationFilter}
+ * provides a simple way to select just the items of interest
+ * when a method returns a collection of declarations.
+ *
+ * @author Joseph D. Darcy
+ * @author Scott Seligman
+ * @version 1.14 07/05/05
+ * @since 1.5
+ */
+
+public interface AnnotationProcessorEnvironment {
+
+ /**
+ * Returns the options passed to the annotation processing tool.
+ * Options are returned in the form of a map from option name
+ * (such as <tt>"-encoding"</tt>) to option value.
+ * For an option with no value (such as <tt>"-help"</tt>), the
+ * corresponding value in the map is <tt>null</tt>.
+ *
+ * <p> Options beginning with <tt>"-A"</tt> are <i>processor-specific.</i>
+ * Such options are unrecognized by the tool, but intended to be used by
+ * some annotation processor.
+ *
+ * @return the options passed to t...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-17 07:09:58
|
Revision: 3265
http://jnode.svn.sourceforge.net/jnode/?rev=3265&view=rev
Author: lsantha
Date: 2007-06-17 00:09:54 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/java/java/io/Console.java
trunk/core/src/openjdk/java/java/lang/Byte.java
trunk/core/src/openjdk/java/java/lang/Integer.java
trunk/core/src/openjdk/java/java/lang/Long.java
trunk/core/src/openjdk/java/java/lang/NumberFormatException.java
trunk/core/src/openjdk/java/java/lang/Short.java
trunk/core/src/openjdk/java/java/util/Properties.java
trunk/core/src/openjdk/java/java/util/XMLUtils.java
trunk/core/src/openjdk/java/java/util/jar/
trunk/core/src/openjdk/java/java/util/jar/JavaUtilJarAccessImpl.java
trunk/core/src/openjdk/sun/sun/misc/BASE64Decoder.java
trunk/core/src/openjdk/sun/sun/misc/BASE64Encoder.java
trunk/core/src/openjdk/sun/sun/misc/CEFormatException.java
trunk/core/src/openjdk/sun/sun/misc/CEStreamExhausted.java
trunk/core/src/openjdk/sun/sun/misc/CRC16.java
trunk/core/src/openjdk/sun/sun/misc/Cache.java
trunk/core/src/openjdk/sun/sun/misc/CharacterDecoder.java
trunk/core/src/openjdk/sun/sun/misc/CharacterEncoder.java
trunk/core/src/openjdk/sun/sun/misc/ClassFileTransformer.java
trunk/core/src/openjdk/sun/sun/misc/ClassLoaderUtil.java
trunk/core/src/openjdk/sun/sun/misc/Cleaner.java
trunk/core/src/openjdk/sun/sun/misc/Compare.java
trunk/core/src/openjdk/sun/sun/misc/CompoundEnumeration.java
trunk/core/src/openjdk/sun/sun/misc/ConditionLock.java
trunk/core/src/openjdk/sun/sun/misc/ExtensionDependency.java
trunk/core/src/openjdk/sun/sun/misc/ExtensionInfo.java
trunk/core/src/openjdk/sun/sun/misc/ExtensionInstallationException.java
trunk/core/src/openjdk/sun/sun/misc/ExtensionInstallationProvider.java
trunk/core/src/openjdk/sun/sun/misc/FileURLMapper.java
trunk/core/src/openjdk/sun/sun/misc/FormattedFloatingDecimal.java
trunk/core/src/openjdk/sun/sun/misc/GC.java
trunk/core/src/openjdk/sun/sun/misc/HexDumpEncoder.java
trunk/core/src/openjdk/sun/sun/misc/InvalidJarIndexException.java
trunk/core/src/openjdk/sun/sun/misc/JarFilter.java
trunk/core/src/openjdk/sun/sun/misc/JarIndex.java
trunk/core/src/openjdk/sun/sun/misc/JavaIOAccess.java
trunk/core/src/openjdk/sun/sun/misc/JavaLangAccess.java
trunk/core/src/openjdk/sun/sun/misc/JavaNetAccess.java
trunk/core/src/openjdk/sun/sun/misc/LRUCache.java
trunk/core/src/openjdk/sun/sun/misc/Launcher.java
trunk/core/src/openjdk/sun/sun/misc/Lock.java
trunk/core/src/openjdk/sun/sun/misc/MessageUtils.java
trunk/core/src/openjdk/sun/sun/misc/MetaIndex.java
trunk/core/src/openjdk/sun/sun/misc/NativeSignalHandler.java
trunk/core/src/openjdk/sun/sun/misc/OSEnvironment.java
trunk/core/src/openjdk/sun/sun/misc/Perf.java
trunk/core/src/openjdk/sun/sun/misc/PerformanceLogger.java
trunk/core/src/openjdk/sun/sun/misc/ProxyGenerator.java
trunk/core/src/openjdk/sun/sun/misc/Queue.java
trunk/core/src/openjdk/sun/sun/misc/REException.java
trunk/core/src/openjdk/sun/sun/misc/Ref.java
trunk/core/src/openjdk/sun/sun/misc/Regexp.java
trunk/core/src/openjdk/sun/sun/misc/RegexpPool.java
trunk/core/src/openjdk/sun/sun/misc/RegexpTarget.java
trunk/core/src/openjdk/sun/sun/misc/Request.java
trunk/core/src/openjdk/sun/sun/misc/RequestProcessor.java
trunk/core/src/openjdk/sun/sun/misc/Resource.java
trunk/core/src/openjdk/sun/sun/misc/SharedSecrets.java
trunk/core/src/openjdk/sun/sun/misc/Signal.java
trunk/core/src/openjdk/sun/sun/misc/SignalHandler.java
trunk/core/src/openjdk/sun/sun/misc/SoftCache.java
trunk/core/src/openjdk/sun/sun/misc/Sort.java
trunk/core/src/openjdk/sun/sun/misc/Timeable.java
trunk/core/src/openjdk/sun/sun/misc/Timer.java
trunk/core/src/openjdk/sun/sun/misc/UCDecoder.java
trunk/core/src/openjdk/sun/sun/misc/UCEncoder.java
trunk/core/src/openjdk/sun/sun/misc/URLClassPath.java
trunk/core/src/openjdk/sun/sun/misc/UUDecoder.java
trunk/core/src/openjdk/sun/sun/misc/UUEncoder.java
trunk/core/src/openjdk/sun/sun/misc/VM.java
trunk/core/src/openjdk/sun/sun/misc/VMNotification.java
trunk/core/src/openjdk/sun/sun/misc/VMSupport.java
trunk/core/src/openjdk/sun/sun/misc/Version-template.java
trunk/core/src/openjdk/sun/sun/misc/resources/
trunk/core/src/openjdk/sun/sun/misc/resources/Messages.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_de.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_es.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_fr.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_it.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_ja.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_ko.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_sv.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_zh_CN.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_zh_TW.java
trunk/core/src/openjdk/sun/sun/net/
trunk/core/src/openjdk/sun/sun/net/www/
trunk/core/src/openjdk/sun/sun/net/www/ParseUtil.java
trunk/core/src/openjdk/sun/sun/nio/cs/
trunk/core/src/openjdk/sun/sun/nio/cs/AbstractCharsetProvider.java
trunk/core/src/openjdk/sun/sun/nio/cs/FastCharsetProvider.java
trunk/core/src/openjdk/sun/sun/nio/cs/HistoricallyNamedCharset.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM437.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM737.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM775.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM850.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM852.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM855.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM857.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM858.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM862.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM866.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM874.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_1.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_13.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_15.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_2.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_4.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_5.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_7.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_9.java
trunk/core/src/openjdk/sun/sun/nio/cs/KOI8_R.java
trunk/core/src/openjdk/sun/sun/nio/cs/KOI8_U.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1250.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1251.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1252.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1253.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1254.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1257.java
trunk/core/src/openjdk/sun/sun/nio/cs/SingleByteDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/SingleByteEncoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/StreamDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/StreamEncoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/Surrogate.java
trunk/core/src/openjdk/sun/sun/nio/cs/ThreadLocalCoders.java
trunk/core/src/openjdk/sun/sun/nio/cs/US_ASCII.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_16.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_16BE.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_16LE.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_16LE_BOM.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32BE.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32BE_BOM.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32Coder.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32LE.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32LE_BOM.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_8.java
trunk/core/src/openjdk/sun/sun/nio/cs/Unicode.java
trunk/core/src/openjdk/sun/sun/nio/cs/UnicodeDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/UnicodeEncoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/
trunk/core/src/openjdk/sun/sun/nio/cs/ext/Big5.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/Big5_HKSCS.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/Big5_Solaris.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCSDecoderMapping.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCS_IBM_ASCII_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCS_IBM_ASCII_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCS_IBM_EBCDIC_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCS_IBM_EBCDIC_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCS_ONLY_IBM_EBCDIC_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DelegatableDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DoubleByteDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DoubleByteEncoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_CN.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_JP.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_JP_LINUX.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_JP_Open.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_KR.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_TW.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ExtendedCharsets.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/GB18030.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/GBK.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/HKSCS.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/HKSCS_2001.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM037.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1006.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1025.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1026.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1046.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1047.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1097.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1098.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1112.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1122.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1123.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1124.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1140.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1141.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1142.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1143.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1144.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1145.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1146.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1147.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1148.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1149.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1381.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1383.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM273.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM277.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM278.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM280.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM284.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM285.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM297.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM33722.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM420.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM424.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM500.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM834.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM838.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM856.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM860.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM861.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM863.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM864.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM865.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM868.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM869.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM870.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM871.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM875.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM918.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM921.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM922.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM930.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM933.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM935.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM937.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM939.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM942.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM942C.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM943.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM943C.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM948.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM949.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM949C.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM950.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM964.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM970.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISCII91.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_CN.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_CN_CNS.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_CN_GB.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_JP.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_JP_2.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_KR.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO_8859_11.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO_8859_3.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO_8859_6.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO_8859_8.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JISAutoDetect.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0201.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_MS5022X_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_MS5022X_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_MS932_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_MS932_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_Solaris_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_Solaris_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_MS5022X_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_MS5022X_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_Solaris_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_Solaris_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/Johab.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/META-INF/
trunk/core/src/openjdk/sun/sun/nio/cs/ext/META-INF/services/
trunk/core/src/openjdk/sun/sun/nio/cs/ext/META-INF/services/java.nio.charset.spi.CharsetProvider
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS1255.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS1256.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS1258.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS50220.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS50221.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS874.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS932.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS932DB.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS936.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS949.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS950.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS950_HKSCS.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MSISO2022JP.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacArabic.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacCentralEurope.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacCroatian.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacCyrillic.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacDingbat.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacGreek.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacHebrew.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacIceland.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacRoman.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacRomania.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacSymbol.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacThai.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacTurkish.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacUkraine.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/PCK.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/SJIS.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/SimpleEUCDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/SimpleEUCEncoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/TIS_620.java
trunk/core/src/openjdk/sun/sun/nio/cs/standard-charsets
trunk/core/src/openjdk/sun/sun/reflect/ConstantPool.java
Added: trunk/core/src/openjdk/java/java/io/Console.java
===================================================================
--- trunk/core/src/openjdk/java/java/io/Console.java (rev 0)
+++ trunk/core/src/openjdk/java/java/io/Console.java 2007-06-17 07:09:54 UTC (rev 3265)
@@ -0,0 +1,564 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.io;
+
+import java.util.*;
+import java.nio.charset.Charset;
+import sun.nio.cs.StreamDecoder;
+import sun.nio.cs.StreamEncoder;
+
+/**
+ * Methods to access the character-based console device, if any, associated
+ * with the current Java virtual machine.
+ *
+ * <p> Whether a virtual machine has a console is dependent upon the
+ * underlying platform and also upon the manner in which the virtual
+ * machine is invoked. If the virtual machine is started from an
+ * interactive command line without redirecting the standard input and
+ * output streams then its console will exist and will typically be
+ * connected to the keyboard and display from which the virtual machine
+ * was launched. If the virtual machine is started automatically, for
+ * example by a background job scheduler, then it will typically not
+ * have a console.
+ * <p>
+ * If this virtual machine has a console then it is represented by a
+ * unique instance of this class which can be obtained by invoking the
+ * {@link java.lang.System#console()} method. If no console device is
+ * available then an invocation of that method will return <tt>null</tt>.
+ * <p>
+ * Read and write operations are synchronized to guarantee the atomic
+ * completion of critical operations; therefore invoking methods
+ * {@link #readLine()}, {@link #readPassword()}, {@link #format format()},
+ * {@link #printf printf()} as well as the read, format and write operations
+ * on the objects returned by {@link #reader()} and {@link #writer()} may
+ * block in multithreaded scenarios.
+ * <p>
+ * Invoking <tt>close()</tt> on the objects returned by the {@link #reader()}
+ * and the {@link #writer()} will not close the underlying stream of those
+ * objects.
+ * <p>
+ * The console-read methods return <tt>null</tt> when the end of the
+ * console input stream is reached, for example by typing control-D on
+ * Unix or control-Z on Windows. Subsequent read operations will succeed
+ * if additional characters are later entered on the console's input
+ * device.
+ * <p>
+ * Unless otherwise specified, passing a <tt>null</tt> argument to any method
+ * in this class will cause a {@link NullPointerException} to be thrown.
+ * <p>
+ * <b>Security note:</b>
+ * If an application needs to read a password or other secure data, it should
+ * use {@link #readPassword()} or {@link #readPassword(String, Object...)} and
+ * manually zero the returned character array after processing to minimize the
+ * lifetime of sensitive data in memory.
+ *
+ * <blockquote><pre>
+ * Console cons;
+ * char[] passwd;
+ * if ((cons = System.console()) != null &&
+ * (passwd = cons.readPassword("[%s]", "Password:")) != null) {
+ * ...
+ * java.util.Arrays.fill(passwd, ' ');
+ * }
+ * </pre></blockquote>
+ *
+ * @author Xueming Shen
+ * @version 1.17, 05/05/07
+ * @since 1.6
+ */
+
+public final class Console implements Flushable
+{
+ /**
+ * Retrieves the unique {@link java.io.PrintWriter PrintWriter} object
+ * associated with this console.
+ *
+ * @return The printwriter associated with this console
+ */
+ public PrintWriter writer() {
+ return pw;
+ }
+
+ /**
+ * Retrieves the unique {@link java.io.Reader Reader} object associated
+ * with this console.
+ * <p>
+ * This method is intended to be used by sophisticated applications, for
+ * example, a {@link java.util.Scanner} object which utilizes the rich
+ * parsing/scanning functionality provided by the <tt>Scanner</tt>:
+ * <blockquote><pre>
+ * Console con = System.console();
+ * if (con != null) {
+ * Scanner sc = new Scanner(con.reader());
+ * ...
+ * }
+ * </pre></blockquote>
+ * <p>
+ * For simple applications requiring only line-oriented reading, use
+ * <tt>{@link #readLine}</tt>.
+ * <p>
+ * The bulk read operations {@link java.io.Reader#read(char[]) read(char[]) },
+ * {@link java.io.Reader#read(char[], int, int) read(char[], int, int) } and
+ * {@link java.io.Reader#read(java.nio.CharBuffer) read(java.nio.CharBuffer)}
+ * on the returned object will not read in characters beyond the line
+ * bound for each invocation, even if the destination buffer has space for
+ * more characters. A line bound is considered to be any one of a line feed
+ * (<tt>'\n'</tt>), a carriage return (<tt>'\r'</tt>), a carriage return
+ * followed immediately by a linefeed, or an end of stream.
+ *
+ * @return The reader associated with this console
+ */
+ public Reader reader() {
+ return reader;
+ }
+
+ /**
+ * Writes a formatted string to this console's output stream using
+ * the specified format string and arguments.
+ *
+ * @param fmt
+ * A format string as described in <a
+ * href="../util/Formatter.html#syntax">Format string syntax</a>
+ *
+ * @param args
+ * Arguments referenced by the format specifiers in the format
+ * string. If there are more arguments than format specifiers, the
+ * extra arguments are ignored. The number of arguments is
+ * variable and may be zero. The maximum number of arguments is
+ * limited by the maximum dimension of a Java array as defined by
+ * the <a href="http://java.sun.com/docs/books/vmspec/">Java
+ * Virtual Machine Specification</a>. The behaviour on a
+ * <tt>null</tt> argument depends on the <a
+ * href="../util/Formatter.html#syntax">conversion</a>.
+ *
+ * @throws IllegalFormatException
+ * If a format string contains an illegal syntax, a format
+ * specifier that is incompatible with the given arguments,
+ * insufficient arguments given the format string, or other
+ * illegal conditions. For specification of all possible
+ * formatting errors, see the <a
+ * href="../util/Formatter.html#detail">Details</a> section
+ * of the formatter class specification.
+ *
+ * @return This console
+ */
+ public Console format(String fmt, Object ...args) {
+ formatter.format(fmt, args).flush();
+ return this;
+ }
+
+ /**
+ * A convenience method to write a formatted string to this console's
+ * output stream using the specified format string and arguments.
+ *
+ * <p> An invocation of this method of the form <tt>con.printf(format,
+ * args)</tt> behaves in exactly the same way as the invocation of
+ * <pre>con.format(format, args)</pre>.
+ *
+ * @param format
+ * A format string as described in <a
+ * href="../util/Formatter.html#syntax">Format string syntax</a>.
+ *
+ * @param args
+ * Arguments referenced by the format specifiers in the format
+ * string. If there are more arguments than format specifiers, the
+ * extra arguments are ignored. The number of arguments is
+ * variable and may be zero. The maximum number of arguments is
+ * limited by the maximum dimension of a Java array as defined by
+ * the <a href="http://java.sun.com/docs/books/vmspec/">Java
+ * Virtual Machine Specification</a>. The behaviour on a
+ * <tt>null</tt> argument depends on the <a
+ * href="../util/Formatter.html#syntax">conversion</a>.
+ *
+ * @throws IllegalFormatException
+ * If a format string contains an illegal syntax, a format
+ * specifier that is incompatible with the given arguments,
+ * insufficient arguments given the format string, or other
+ * illegal conditions. For specification of all possible
+ * formatting errors, see the <a
+ * href="../util/Formatter.html#detail">Details</a> section of the
+ * formatter class specification.
+ *
+ * @return This console
+ */
+ public Console printf(String format, Object ... args) {
+ return format(format, args);
+ }
+
+ /**
+ * Provides a formatted prompt, then reads a single line of text from the
+ * console.
+ *
+ * @param fmt
+ * A format string as described in <a
+ * href="../util/Formatter.html#syntax">Format string syntax</a>.
+ *
+ * @param args
+ * Arguments referenced by the format specifiers in the format
+ * string. If there are more arguments than format specifiers, the
+ * extra arguments are ignored. The maximum number of arguments is
+ * limited by the maximum dimension of a Java array as defined by
+ * the <a href="http://java.sun.com/docs/books/vmspec/">Java
+ * Virtual Machine Specification</a>.
+ *
+ * @throws IllegalFormatException
+ * If a format string contains an illegal syntax, a format
+ * specifier that is incompatible with the given arguments,
+ * insufficient arguments given the format string, or other
+ * illegal conditions. For specification of all possible
+ * formatting errors, see the <a
+ * href="../util/Formatter.html#detail">Details</a> section
+ * of the formatter class specification.
+ *
+ * @throws IOError
+ * If an I/O error occurs.
+ *
+ * @return A string containing the line read from the console, not
+ * including any line-termination characters, or <tt>null</tt>
+ * if an end of stream has been reached.
+ */
+ public String readLine(String fmt, Object ... args) {
+ String line = null;
+ synchronized (writeLock) {
+ synchronized(readLock) {
+ if (fmt.length() != 0)
+ pw.format(fmt, args);
+ try {
+ char[] ca = readline(false);
+ if (ca != null)
+ line = new String(ca);
+ } catch (IOException x) {
+ throw new IOError(x);
+ }
+ }
+ }
+ return line;
+ }
+
+ /**
+ * Reads a single line of text from the console.
+ *
+ * @throws IOError
+ * If an I/O error occurs.
+ *
+ * @return A string containing the line read from the console, not
+ * including any line-termination characters, or <tt>null</tt>
+ * if an end of stream has been reached.
+ */
+ public String readLine() {
+ return readLine("");
+ }
+
+ /**
+ * Provides a formatted prompt, then reads a password or passphrase from
+ * the console with echoing disabled.
+ *
+ * @param fmt
+ * ...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-17 09:07:17
|
Revision: 3271
http://jnode.svn.sourceforge.net/jnode/?rev=3271&view=rev
Author: lsantha
Date: 2007-06-17 02:07:11 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/com/com/sun/activation/
trunk/core/src/openjdk/com/com/sun/activation/registries/
trunk/core/src/openjdk/com/com/sun/activation/registries/LogSupport.java
trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapFile.java
trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapParseException.java
trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapTokenizer.java
trunk/core/src/openjdk/com/com/sun/activation/registries/MimeTypeEntry.java
trunk/core/src/openjdk/com/com/sun/activation/registries/MimeTypeFile.java
trunk/core/src/openjdk/javax/javax/activation/
trunk/core/src/openjdk/javax/javax/activation/ActivationDataFlavor.java
trunk/core/src/openjdk/javax/javax/activation/CommandInfo.java
trunk/core/src/openjdk/javax/javax/activation/CommandMap.java
trunk/core/src/openjdk/javax/javax/activation/CommandObject.java
trunk/core/src/openjdk/javax/javax/activation/DataContentHandler.java
trunk/core/src/openjdk/javax/javax/activation/DataContentHandlerFactory.java
trunk/core/src/openjdk/javax/javax/activation/DataHandler.java
trunk/core/src/openjdk/javax/javax/activation/DataSource.java
trunk/core/src/openjdk/javax/javax/activation/FileDataSource.java
trunk/core/src/openjdk/javax/javax/activation/FileTypeMap.java
trunk/core/src/openjdk/javax/javax/activation/MailcapCommandMap.java
trunk/core/src/openjdk/javax/javax/activation/MimeType.java
trunk/core/src/openjdk/javax/javax/activation/MimeTypeParameterList.java
trunk/core/src/openjdk/javax/javax/activation/MimeTypeParseException.java
trunk/core/src/openjdk/javax/javax/activation/MimetypesFileTypeMap.java
trunk/core/src/openjdk/javax/javax/activation/SecuritySupport.java
trunk/core/src/openjdk/javax/javax/activation/URLDataSource.java
trunk/core/src/openjdk/javax/javax/activation/UnsupportedDataTypeException.java
trunk/core/src/openjdk/javax/javax/activity/
trunk/core/src/openjdk/javax/javax/activity/ActivityCompletedException.java
trunk/core/src/openjdk/javax/javax/activity/ActivityRequiredException.java
trunk/core/src/openjdk/javax/javax/activity/InvalidActivityException.java
trunk/core/src/openjdk/javax/javax/activity/package.html
trunk/core/src/openjdk/javax/javax/jws/
trunk/core/src/openjdk/javax/javax/jws/HandlerChain.java
trunk/core/src/openjdk/javax/javax/jws/Oneway.java
trunk/core/src/openjdk/javax/javax/jws/WebMethod.java
trunk/core/src/openjdk/javax/javax/jws/WebParam.java
trunk/core/src/openjdk/javax/javax/jws/WebResult.java
trunk/core/src/openjdk/javax/javax/jws/WebService.java
trunk/core/src/openjdk/javax/javax/jws/soap/
trunk/core/src/openjdk/javax/javax/jws/soap/InitParam.java
trunk/core/src/openjdk/javax/javax/jws/soap/SOAPBinding.java
trunk/core/src/openjdk/javax/javax/jws/soap/SOAPMessageHandler.java
trunk/core/src/openjdk/javax/javax/jws/soap/SOAPMessageHandlers.java
Added: trunk/core/src/openjdk/com/com/sun/activation/registries/LogSupport.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/activation/registries/LogSupport.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/activation/registries/LogSupport.java 2007-06-17 09:07:11 UTC (rev 3271)
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2003-2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.activation.registries;
+
+import java.io.*;
+import java.util.logging.*;
+
+/**
+ * Logging related methods.
+ */
+public class LogSupport {
+ private static boolean debug = false;
+ private static Logger logger;
+ private static final Level level = Level.FINE;
+
+ static {
+ try {
+ debug = Boolean.getBoolean("javax.activation.debug");
+ } catch (Throwable t) {
+ // ignore any errors
+ }
+ logger = Logger.getLogger("javax.activation");
+ }
+
+ /**
+ * Constructor.
+ */
+ private LogSupport() {
+ // private constructor, can't create instances
+ }
+
+ public static void log(String msg) {
+ if (debug)
+ System.out.println(msg);
+ logger.log(level, msg);
+ }
+
+ public static void log(String msg, Throwable t) {
+ if (debug)
+ System.out.println(msg + "; Exception: " + t);
+ logger.log(level, msg, t);
+ }
+
+ public static boolean isLoggable() {
+ return debug || logger.isLoggable(level);
+ }
+}
Added: trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapFile.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapFile.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapFile.java 2007-06-17 09:07:11 UTC (rev 3271)
@@ -0,0 +1,560 @@
+/*
+ * Copyright 1997-2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.activation.registries;
+
+import java.io.*;
+import java.util.*;
+
+public class MailcapFile {
+
+ /**
+ * A Map indexed by MIME type (string) that references
+ * a Map of commands for each type. The comand Map
+ * is indexed by the command name and references a List of
+ * class names (strings) for each command.
+ */
+ private Map type_hash = new HashMap();
+
+ /**
+ * Another Map like above, but for fallback entries.
+ */
+ private Map fallback_hash = new HashMap();
+
+ /**
+ * A Map indexed by MIME type (string) that references
+ * a List of native commands (string) corresponding to the type.
+ */
+ private Map native_commands = new HashMap();
+
+ private static boolean addReverse = false;
+
+ static {
+ try {
+ addReverse = Boolean.getBoolean("javax.activation.addreverse");
+ } catch (Throwable t) {
+ // ignore any errors
+ }
+ }
+
+ /**
+ * The constructor that takes a filename as an argument.
+ *
+ * @param new_fname The file name of the mailcap file.
+ */
+ public MailcapFile(String new_fname) throws IOException {
+ if (LogSupport.isLoggable())
+ LogSupport.log("new MailcapFile: file " + new_fname);
+ FileReader reader = null;
+ try {
+ reader = new FileReader(new_fname);
+ parse(new BufferedReader(reader));
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (IOException ex) { }
+ }
+ }
+ }
+
+ /**
+ * The constructor that takes an input stream as an argument.
+ *
+ * @param is the input stream
+ */
+ public MailcapFile(InputStream is) throws IOException {
+ if (LogSupport.isLoggable())
+ LogSupport.log("new MailcapFile: InputStream");
+ parse(new BufferedReader(new InputStreamReader(is, "iso-8859-1")));
+ }
+
+ /**
+ * Mailcap file default constructor.
+ */
+ public MailcapFile() {
+ if (LogSupport.isLoggable())
+ LogSupport.log("new MailcapFile: default");
+ }
+
+ /**
+ * Get the Map of MailcapEntries based on the MIME type.
+ *
+ * <p>
+ * <strong>Semantics:</strong> First check for the literal mime type,
+ * if that fails looks for wildcard <type>/\* and return that. Return the
+ * list of all that hit.
+ */
+ public Map getMailcapList(String mime_type) {
+ Map search_result = null;
+ Map wildcard_result = null;
+
+ // first try the literal
+ search_result = (Map)type_hash.get(mime_type);
+
+ // ok, now try the wildcard
+ int separator = mime_type.indexOf('/');
+ String subtype = mime_type.substring(separator + 1);
+ if (!subtype.equals("*")) {
+ String type = mime_type.substring(0, separator + 1) + "*";
+ wildcard_result = (Map)type_hash.get(type);
+
+ if (wildcard_result != null) { // damn, we have to merge!!!
+ if (search_result != null)
+ search_result =
+ mergeResults(search_result, wildcard_result);
+ else
+ search_result = wildcard_result;
+ }
+ }
+ return search_result;
+ }
+
+ /**
+ * Get the Map of fallback MailcapEntries based on the MIME type.
+ *
+ * <p>
+ * <strong>Semantics:</strong> First check for the literal mime type,
+ * if that fails looks for wildcard <type>/\* and return that. Return the
+ * list of all that hit.
+ */
+ public Map getMailcapFallbackList(String mime_type) {
+ Map search_result = null;
+ Map wildcard_result = null;
+
+ // first try the literal
+ search_result = (Map)fallback_hash.get(mime_type);
+
+ // ok, now try the wildcard
+ int separator = mime_type.indexOf('/');
+ String subtype = mime_type.substring(separator + 1);
+ if (!subtype.equals("*")) {
+ String type = mime_type.substring(0, separator + 1) + "*";
+ wildcard_result = (Map)fallback_hash.get(type);
+
+ if (wildcard_result != null) { // damn, we have to merge!!!
+ if (search_result != null)
+ search_result =
+ mergeResults(search_result, wildcard_result);
+ else
+ search_result = wildcard_result;
+ }
+ }
+ return search_result;
+ }
+
+ /**
+ * Return all the MIME types known to this mailcap file.
+ */
+ public String[] getMimeTypes() {
+ Set types = new HashSet(type_hash.keySet());
+ types.addAll(fallback_hash.keySet());
+ types.addAll(native_commands.keySet());
+ String[] mts = new String[types.size()];
+ mts = (String[])types.toArray(mts);
+ return mts;
+ }
+
+ /**
+ * Return all the native comands for the given MIME type.
+ */
+ public String[] getNativeCommands(String mime_type) {
+ String[] cmds = null;
+ List v = (List)native_commands.get(mime_type.toLowerCase());
+ if (v != null) {
+ cmds = new String[v.size()];
+ cmds = (String[])v.toArray(cmds);
+ }
+ return cmds;
+ }
+
+ /**
+ * Merge the first hash into the second.
+ * This merge will only effect the hashtable that is
+ * returned, we don't want to touch the one passed in since
+ * its integrity must be maintained.
+ */
+ private Map mergeResults(Map first, Map second) {
+ Iterator verb_enum = second.keySet().iterator();
+ Map clonedHash = new HashMap(first);
+
+ // iterate through the verbs in the second map
+ while (verb_enum.hasNext()) {
+ String verb = (String)verb_enum.next();
+ List cmdVector = (List)clonedHash.get(verb);
+ if (cmdVector == null) {
+ clonedHash.put(verb, second.get(verb));
+ } else {
+ // merge the two
+ List oldV = (List)second.get(verb);
+ cmdVector = new ArrayList(cmdVector);
+ cmdVector.addAll(oldV);
+ clonedHash.put(verb, cmdVector);
+ }
+ }
+ return clonedHash;
+ }
+
+ /**
+ * appendToMailcap: Append to this Mailcap DB, use the mailcap
+ * format:
+ * Comment == "# <i>comment string</i>
+ * Entry == "mimetype; javabeanclass<nl>
+ *
+ * Example:
+ * # this is a comment
+ * image/gif jaf.viewers.ImageViewer
+ */
+ public void appendToMailcap(String mail_cap) {
+ if (LogSupport.isLoggable())
+ LogSupport.log("appendToMailcap: " + mail_cap);
+ try {
+ parse(new StringReader(mail_cap));
+ } catch (IOException ex) {
+ // can't happen
+ }
+ }
+
+ /**
+ * parse file into a hash table of MC Type Entry Obj
+ */
+ private void parse(Reader reader) throws IOException {
+ BufferedReader buf_reader = new BufferedReader(reader);
+ String line = null;
+ String continued = null;
+
+ while ((line = buf_reader.readLine()) != null) {
+ // LogSupport.log("parsing line: " + line);
+
+ line = line.trim();
+
+ try {
+ if (line.charAt(0) == '#')
+ continue;
+ if (line.charAt(line.length() - 1) == '\\') {
+ if (continued != null)
+ continued += line.substring(0, line.length() - 1);
+ else
+ continued = line.substring(0, line.length() - 1);
+ } else if (continued != null) {
+ // handle the two strings
+ continued = continued + line;
+ // LogSupport.log("parse: " + continued);
+ try {
+ parseLine(continued);
+ } catch (MailcapParseException e) {
+ //e.printStackTrace();
+ }
+ continued = null;
+ }
+ else {
+ // LogSupport.log("parse: " + line);
+ try {
+ parseLine(line);
+ // LogSupport.log("hash.size = " + type_hash.size());
+ } catch (MailcapParseException e) {
+ //e.printStackTrace();
+ }
+ }
+ } catch (StringIndexOutOfBoundsException e) {}
+ }
+ }
+
+ /**
+ * A routine to parse individual entries in a Mailcap file.
+ *
+ * Note that this routine does not handle line continuations.
+ * They should have been handled prior to calling this routine.
+ */
+ protected void parseLine(String mailcapEntry)
+ throws MailcapParseException, IOException {
+ MailcapTokenizer tokenizer = new MailcapTokenizer(mailcapEntry);
+ tokenizer.setIsAutoquoting(false);
+
+ if (LogSupport.isLoggable())
+ LogSupport.log("parse: " + mailcapEntry);
+ // parse the primary type
+ int currentToken = tokenizer.nextToken();
+ if (currentToken != MailcapTokenizer.STRING_TOKEN) {
+ reportParseError(MailcapTokenizer.STRING_TOKEN, currentToken,
+ tokenizer.getCurrentTokenValue());
+ }
+ String primaryType = tokenizer.getCurrentTokenValue().toLowerCase();
+ String subType = "*";
+
+ // parse the '/' between primary and sub
+ // if it's not present that's ok, we just don't have a subtype
+ currentToken = tokenizer.nextToken();
+ if ((currentToken != MailcapTokenizer.SLASH_TOKEN) &&
+ (currentToken != MailcapTokenizer.SEMICOLON_TOKEN)) {
+ reportParseError(MailcapTokenizer.SLASH_TOKEN,
+ MailcapTokenizer.SEMICOLON_TOKEN, currentToken,
+ tokenizer.getCurrentTokenValue());
+ }
+
+ // only need to look for a sub type if we got a '/'
+ if (currentToken == MailcapTokenizer.SLASH_TOKEN) {
+ // parse the sub type
+ currentToken = tokenizer.nextToken();
+ if (currentToken != MailcapTokenizer.STRING_TOKEN) {
+ reportParseError(MailcapTokenizer.STRING_TOKEN,
+ currentToken, tokenizer.getCurrentTokenValue());
+ }
+ subType = tokenizer.getCurrentTokenValue().toLowerCase();
+
+ // get the next token to simplify the next step
+ currentToken = tokenizer.nextToken();
+ }
+
+ String mimeType = primaryType + "/" + subType;
+
+ if (LogSupport.isLoggable())
+ LogSupport.log(" Type: " + mimeType);
+
+ // now setup the commands hashtable
+ Map commands = new LinkedHashMap(); // keep commands in order found
+
+ // parse the ';' that separates the type from the parameters
+ if (currentToken != MailcapTokenizer.SEMICOLON_TOKEN) {
+ reportParseError(MailcapTokenizer.SEMICOLON_TOKEN,
+ currentToken, tokenizer.getCurrentTokenValue());
+ }
+ // eat it
+
+ // parse the required view command
+ tokenizer.setIsAutoquoting(true);
+ currentToken = tokenizer.nextToken();
+ tokenizer.setIsAutoquoting(false);
+ if ((currentToken != MailcapTokenizer.STRING_TOKEN) &&
+ (currentToken != MailcapTokenizer.SEMICOLON_TOKEN)) {
+ reportParseError(MailcapTokenizer.STRING_TOKEN,
+ MailcapTokenizer.SEMICOLON_TOKEN, currentToken,
+ tokenizer.getCurrentTokenValue());
+ }
+
+ if (currentToken == MailcapTokenizer.STRING_TOKEN) {
+ // have a native comand, save the entire mailcap entry
+ //String nativeCommand = tokenizer.getCurrentTokenValue();
+ List v = (List)native_commands.get(mimeType);
+ if (v == null) {
+ v = new ArrayList();
+ v.add(mailcapEntry);
+ native_commands.put(mimeType, v);
+ } else {
+ // XXX - check for duplicates?
+ v.add(mailcapEntry);
+ }
+ }
+
+ // only have to get the next token if the current one isn't a ';'
+ if (currentToken != MailcapTokenizer.SEMICOLON_TOKEN) {
+ currentToken = tokenizer.nextToken();
+ }
+
+ // look for a ';' which will indicate whether
+ // a parameter list is present or not
+ if (currentToken == MailcapTokenizer.SEMICOLON_TOKEN) {
+ boolean isFallback = false;
+ do {
+ // eat the ';'
+
+ // parse the parameter name
+ currentToken = tokenizer.nextToken();
+ if (currentToken != MailcapTokenizer.STRING_TOKEN) {
+ reportParseError(MailcapTokenizer.STRING_TOKEN,
+ currentToken, tokenizer.getCurrentTokenValue());
+ }
+ String paramName =
+ tokenizer.getCurrentTokenValue().toLowerCase();
+
+ // parse the '=' which separates the name from the value
+ currentToken = tokenizer.nextToken();
+ if ((currentToken != MailcapTokenizer.EQUALS_TOKEN) &&
+ (currentToken != MailcapTokenizer.SEMICOLON_TOKEN) &&
+ (currentToken != MailcapTokenizer.EOI_TOKEN)) {
+ reportParseError(MailcapTokenizer.EQUALS_TOKEN,
+ MailcapTokenizer.SEMICOLON_TOKEN,
+ MailcapTokenizer.EOI_TOKEN,
+ currentToken, tokenizer.getCurrentTokenValue());
+ }
+
+ // we only have a useful command if it is named
+ if (currentToken == MailcapTokenizer.EQUALS_TOKEN) {
+ // eat it
+
+ // parse the parameter value (which is autoquoted)
+ tokenizer.setIsAutoquoting(true);
+ currentToken = tokenizer.nextToken();
+ tokenizer.setIsAutoquoting(false);
+ if (currentToken != MailcapTokenizer.STRING_TOKEN) {
+ reportParseError(MailcapTokenizer.STRING_TOKEN,
+ currentToken, tokenizer.getCurrentTokenValue());
+ }
+ String paramValue =
+ tokenizer.getCurrentTokenValue();
+
+ // add the class to the list iff it is one we care about
+ if (paramName.startsWith("x-java-")) {
+ String commandName = paramName.substring(7);
+ // 7 == "x-java-".length
+
+ if (commandName.equals("fallback-entry") &&
+ paramValue.equalsIgnoreCase("true")) {
+ isFallback = true;
+ } else {
+
+ // setup the class entry list
+ if (LogSupport.isLoggable())
+ LogSupport.log(" Command: " + commandName +
+ ", Class: " + paramValue);
+ List classes = (List)commands.get(commandName);
+ if (classes == null) {
+ classes = new ArrayList();
+ commands.put(commandName, classes);
+ }
+ if (addReverse)
+ classes.add(0, paramValue);
+ else
+ classes.add(paramValue);
+ }
+ }
+
+ // set up the next iteration
+ currentToken = tokenizer.nextToken();
+ }
+ } while (currentToken == MailcapTokenizer.SEMICOLON_TOKEN);
+
+ Map masterHash = isFallback ? fallback_hash : type_hash;
+ Map curcommands =
+ (Map)masterHash.get(mimeType);
+ if (curcommands == null) {
+ masterHash.put(mimeType, commands);
+ } else {
+ if (LogSupport.isLoggable())
+ LogSupport.log("Merging commands for type " + mimeType);
+ // have to merge current and new commands
+ // first, merge list of classes for commands already known
+ Iterator cn = curcommands.keySet().iterator();
+ while (cn.hasNext()) {
+ String cmdName = (String)cn.next();
+ List ccv = (List)curcommands.get(cmdName);
+ List cv = (List)commands.get(cmdName);
+ if (cv == null)
+ continue;
+ // add everything in cv to ccv, if it's not already there
+ Iterator cvn = cv.iterator();
+ while (cvn.hasNext()) {
+ String clazz = (String)cvn.next();
+ if (!ccv.contains(clazz))
+ if (addReverse)
+ ccv.add(0, clazz);
+ else
+ ccv.add(clazz);
+ }
+ }
+ // now, add commands not previously known
+ cn = commands.keySet().iterator();
+ while (cn.hasNext()) {
+ String cmdName = (String)cn.next();
+ if (curcommands.containsKey(cmdName))
+ continue;
+ List cv = (List)commands.get(cmdName);
+ curcommands.put(cmdName, cv);
+ }
+ }
+ } else if (currentToken != MailcapTokenizer.EOI_TOKEN) {
+ reportParseError(MailcapTokenizer.EOI_TOKEN,
+ MailcapTokenizer.SEMICOLON_TOKEN,
+ currentToken, tokenizer.getCurrentTokenValue());
+ }
+ }
+
+ protected static void reportParseError(int expectedToken, int actualToken,
+ String actualTokenValue) throws MailcapParseException {
+ throw new MailcapParseException("Encountered a " +
+ MailcapTokenizer.nameForToken(actualToken) + " token (" +
+ actualTokenValue + ") while expecting a " +
+ MailcapTokenizer.nameForToken(expectedToken) + " token.");
+ }
+
+ protected static void reportParseError(int expectedToken,
+ int otherExpectedToken, int actualToken, String actualTokenValue)
+ throws MailcapParseException {
+ throw new MailcapParseException("Encountered a " +
+ MailcapTokenizer.nameForToken(actualToken) + " token (" +
+ actualTokenValue + ") while expecting a " +
+ MailcapTokenizer.nameForToken(expectedToken) + " or a " +
+ MailcapTokenizer.nameForToken(otherExpectedToken) + " token.");
+ }
+
+ protected static void reportParseError(int expectedToken,
+ int otherExpectedToken, int anotherExpectedToken, int actualToken,
+ String actualTokenValue) throws MailcapParseException {
+ if (LogSupport.isLoggable())
+ LogSupport.log("PARSE ERROR: " + "Encountered a " +
+ MailcapTokenizer.nameForToken(actualToken) + " token (" +
+ actualTokenValue + ") while expecting a " +
+ MailcapTokenizer.nameForToken(expectedToken) + ", a " +
+ MailcapTokenizer.nameForToken(otherExpectedToken) + ", or a " +
+ MailcapTokenizer.nameForToken(anotherExpectedToken) + " token.");
+ throw new MailcapParseException("Encountered a " +
+ MailcapTokenizer.nameForToken(actualToken) + " token (" +
+ actualTokenValue + ") while expecting a " +
+ MailcapTokenizer.nameForToken(expectedToken) + ", a " +
+ MailcapTokenizer.nameForToken(otherExpectedToken) + ", or a " +
+ MailcapTokenizer.nameForToken(anotherExpectedToken) + " token.");
+ }
+
+ /** for debugging
+ public static void main(String[] args) throws Exception {
+ Map masterHash = new HashMap();
+ for (int i = 0; i < args.length; ++i) {
+ System.out.println("Entry " + i + ": " + args[i]);
+ parseLine(args[i], masterHash);
+ }
+
+ Enumeration types = masterHash.keys();
+ while (types.hasMoreElements()) {
+ String key = (String)types.nextElement();
+ System.out.println("MIME Type: " + key);
+
+ Map commandHash = (Map)masterHash.get(key);
+ Enumeration commands = commandHash.keys();
+ while (commands.hasMoreElements()) {
+ String command = (String)commands.nextElement();
+ System.out.println(" Command: " + command);
+
+ Vector classes = (Vector)commandHash.get(command);
+ for (int i = 0; i < classes.size(); ++i) {
+ System.out.println(" Class: " +
+ (String)classes.elementAt(i));
+ }
+ }
+
+ System.out.println("");
+ }
+ }
+ */
+}
Added: trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapParseException.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapParseException.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapParseException.java 2007-06-17 09:07:11 UTC (rev 3271)
@@ -0,0 +1,40 @@
+/*
+ * Copyright 1997 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.activation.registries;
+
+/**
+ * A class to encapsulate Mailcap parsing related exceptions
+ */
+public class MailcapParseException extends Exception {
+
+ public MailcapParseException() {
+ super();
+ }
+
+ public MailcapParseException(String inInfo) {
+ super(inInfo);
+ }
+}
Added: trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapTokenizer.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapTokenizer.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/activation/registries/MailcapTokenizer.java 2007-06-17 09:07:11 UTC (rev 3271)
@@ -0,0 +1,321 @@
+/*
+ * Copyright 1997-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.activation.registries;
+
+/**
+ * A tokenizer for strings in the form of "foo/bar; prop1=val1; ... ".
+ * Useful for parsing MIME content types.
+ */
+public class MailcapTokenizer {
+
+ public static final int UNKNOWN_TOKEN = 0;
+ public static final int START_TOKEN = 1;
+ public static final int STRING_TOKEN = 2;
+ public static final int EOI_TOKEN = 5;
+ public static final int SLASH_TOKEN = '/';
+ public static final int SEMICOLON_TOKEN = ';';
+ public static final int EQUALS_TOKEN = '=';
+
+ /**
+ * Constructor
+ *
+ * @parameter inputString the string to tokenize
+ */
+ public MailcapTokenizer(String inputString) {
+ data = inputString;
+ dataIndex = 0;
+ dataLength = inputString.length();
+
+ currentToken = START_TOKEN;
+ currentTokenValue = "";
+
+ isAutoquoting = false;
+ autoquoteChar = ';';
+ }
+
+ /**
+ * Set whether auto-quoting is on or off.
+ *
+ * Auto-quoting means that all characters after the first
+ * non-whitespace, non-control character up to the auto-quote
+ * terminator character or EOI (minus any whitespace immediatley
+ * preceeding it) is considered a token.
+ *
+ * This is required for handling command strings in a mailcap entry.
+ */
+ public void setIsAutoquoting(boolean value) {
+ isAutoquoting = value;
+ }
+
+ /**
+ * Retrieve current token.
+ *
+ * @returns The current token value
+ */
+ public int getCurrentToken() {
+ return currentToken;
+ }
+
+ /*
+ * Get a String that describes the given token.
+ */
+ public static String nameForToken(int token) {
+ String name = "really unknown";
+
+ switch(token) {
+ case UNKNOWN_TOKEN:
+ name = "unknown";
+ break;
+ case START_TOKEN:
+ name = "start";
+ break;
+ case...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-17 10:09:43
|
Revision: 3274
http://jnode.svn.sourceforge.net/jnode/?rev=3274&view=rev
Author: lsantha
Date: 2007-06-17 03:09:41 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/java/java/rmi/
trunk/core/src/openjdk/java/java/rmi/AccessException.java
trunk/core/src/openjdk/java/java/rmi/AlreadyBoundException.java
trunk/core/src/openjdk/java/java/rmi/ConnectException.java
trunk/core/src/openjdk/java/java/rmi/ConnectIOException.java
trunk/core/src/openjdk/java/java/rmi/MarshalException.java
trunk/core/src/openjdk/java/java/rmi/MarshalledObject.java
trunk/core/src/openjdk/java/java/rmi/Naming.java
trunk/core/src/openjdk/java/java/rmi/NoSuchObjectException.java
trunk/core/src/openjdk/java/java/rmi/NotBoundException.java
trunk/core/src/openjdk/java/java/rmi/RMISecurityException.java
trunk/core/src/openjdk/java/java/rmi/RMISecurityManager.java
trunk/core/src/openjdk/java/java/rmi/Remote.java
trunk/core/src/openjdk/java/java/rmi/RemoteException.java
trunk/core/src/openjdk/java/java/rmi/ServerError.java
trunk/core/src/openjdk/java/java/rmi/ServerException.java
trunk/core/src/openjdk/java/java/rmi/ServerRuntimeException.java
trunk/core/src/openjdk/java/java/rmi/StubNotFoundException.java
trunk/core/src/openjdk/java/java/rmi/UnexpectedException.java
trunk/core/src/openjdk/java/java/rmi/UnknownHostException.java
trunk/core/src/openjdk/java/java/rmi/UnmarshalException.java
trunk/core/src/openjdk/java/java/rmi/activation/
trunk/core/src/openjdk/java/java/rmi/activation/Activatable.java
trunk/core/src/openjdk/java/java/rmi/activation/ActivateFailedException.java
trunk/core/src/openjdk/java/java/rmi/activation/ActivationDesc.java
trunk/core/src/openjdk/java/java/rmi/activation/ActivationException.java
trunk/core/src/openjdk/java/java/rmi/activation/ActivationGroup.java
trunk/core/src/openjdk/java/java/rmi/activation/ActivationGroupDesc.java
trunk/core/src/openjdk/java/java/rmi/activation/ActivationGroupID.java
trunk/core/src/openjdk/java/java/rmi/activation/ActivationID.java
trunk/core/src/openjdk/java/java/rmi/activation/ActivationInstantiator.java
trunk/core/src/openjdk/java/java/rmi/activation/ActivationMonitor.java
trunk/core/src/openjdk/java/java/rmi/activation/ActivationSystem.java
trunk/core/src/openjdk/java/java/rmi/activation/Activator.java
trunk/core/src/openjdk/java/java/rmi/activation/UnknownGroupException.java
trunk/core/src/openjdk/java/java/rmi/activation/UnknownObjectException.java
trunk/core/src/openjdk/java/java/rmi/activation/package.html
trunk/core/src/openjdk/java/java/rmi/dgc/
trunk/core/src/openjdk/java/java/rmi/dgc/DGC.java
trunk/core/src/openjdk/java/java/rmi/dgc/Lease.java
trunk/core/src/openjdk/java/java/rmi/dgc/VMID.java
trunk/core/src/openjdk/java/java/rmi/dgc/package.html
trunk/core/src/openjdk/java/java/rmi/package.html
trunk/core/src/openjdk/java/java/rmi/registry/
trunk/core/src/openjdk/java/java/rmi/registry/LocateRegistry.java
trunk/core/src/openjdk/java/java/rmi/registry/Registry.java
trunk/core/src/openjdk/java/java/rmi/registry/RegistryHandler.java
trunk/core/src/openjdk/java/java/rmi/registry/package.html
trunk/core/src/openjdk/java/java/rmi/server/
trunk/core/src/openjdk/java/java/rmi/server/ExportException.java
trunk/core/src/openjdk/java/java/rmi/server/LoaderHandler.java
trunk/core/src/openjdk/java/java/rmi/server/LogStream.java
trunk/core/src/openjdk/java/java/rmi/server/ObjID.java
trunk/core/src/openjdk/java/java/rmi/server/Operation.java
trunk/core/src/openjdk/java/java/rmi/server/RMIClassLoader.java
trunk/core/src/openjdk/java/java/rmi/server/RMIClassLoaderSpi.java
trunk/core/src/openjdk/java/java/rmi/server/RMIClientSocketFactory.java
trunk/core/src/openjdk/java/java/rmi/server/RMIFailureHandler.java
trunk/core/src/openjdk/java/java/rmi/server/RMIServerSocketFactory.java
trunk/core/src/openjdk/java/java/rmi/server/RMISocketFactory.java
trunk/core/src/openjdk/java/java/rmi/server/RemoteCall.java
trunk/core/src/openjdk/java/java/rmi/server/RemoteObject.java
trunk/core/src/openjdk/java/java/rmi/server/RemoteObjectInvocationHandler.java
trunk/core/src/openjdk/java/java/rmi/server/RemoteRef.java
trunk/core/src/openjdk/java/java/rmi/server/RemoteServer.java
trunk/core/src/openjdk/java/java/rmi/server/RemoteStub.java
trunk/core/src/openjdk/java/java/rmi/server/ServerCloneException.java
trunk/core/src/openjdk/java/java/rmi/server/ServerNotActiveException.java
trunk/core/src/openjdk/java/java/rmi/server/ServerRef.java
trunk/core/src/openjdk/java/java/rmi/server/Skeleton.java
trunk/core/src/openjdk/java/java/rmi/server/SkeletonMismatchException.java
trunk/core/src/openjdk/java/java/rmi/server/SkeletonNotFoundException.java
trunk/core/src/openjdk/java/java/rmi/server/SocketSecurityException.java
trunk/core/src/openjdk/java/java/rmi/server/UID.java
trunk/core/src/openjdk/java/java/rmi/server/UnicastRemoteObject.java
trunk/core/src/openjdk/java/java/rmi/server/Unreferenced.java
trunk/core/src/openjdk/java/java/rmi/server/package.html
trunk/core/src/openjdk/sun/sun/rmi/
trunk/core/src/openjdk/sun/sun/rmi/log/
trunk/core/src/openjdk/sun/sun/rmi/log/LogHandler.java
trunk/core/src/openjdk/sun/sun/rmi/log/LogInputStream.java
trunk/core/src/openjdk/sun/sun/rmi/log/LogOutputStream.java
trunk/core/src/openjdk/sun/sun/rmi/log/ReliableLog.java
trunk/core/src/openjdk/sun/sun/rmi/registry/
trunk/core/src/openjdk/sun/sun/rmi/registry/RegistryImpl.java
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry.properties
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_de.properties
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_es.properties
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_fr.properties
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_it.properties
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_ja.properties
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_ko.properties
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_sv.properties
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_zh_CN.properties
trunk/core/src/openjdk/sun/sun/rmi/registry/resources/rmiregistry_zh_TW.properties
trunk/core/src/openjdk/sun/sun/rmi/runtime/
trunk/core/src/openjdk/sun/sun/rmi/runtime/Log.java
trunk/core/src/openjdk/sun/sun/rmi/runtime/NewThreadAction.java
trunk/core/src/openjdk/sun/sun/rmi/runtime/RuntimeUtil.java
trunk/core/src/openjdk/sun/sun/rmi/server/
trunk/core/src/openjdk/sun/sun/rmi/server/ActivatableRef.java
trunk/core/src/openjdk/sun/sun/rmi/server/ActivatableServerRef.java
trunk/core/src/openjdk/sun/sun/rmi/server/ActivationGroupImpl.java
trunk/core/src/openjdk/sun/sun/rmi/server/ActivationGroupInit.java
trunk/core/src/openjdk/sun/sun/rmi/server/Dispatcher.java
trunk/core/src/openjdk/sun/sun/rmi/server/InactiveGroupException.java
trunk/core/src/openjdk/sun/sun/rmi/server/LoaderHandler.java
trunk/core/src/openjdk/sun/sun/rmi/server/MarshalInputStream.java
trunk/core/src/openjdk/sun/sun/rmi/server/MarshalOutputStream.java
trunk/core/src/openjdk/sun/sun/rmi/server/UnicastRef.java
trunk/core/src/openjdk/sun/sun/rmi/server/UnicastRef2.java
trunk/core/src/openjdk/sun/sun/rmi/server/UnicastServerRef.java
trunk/core/src/openjdk/sun/sun/rmi/server/UnicastServerRef2.java
trunk/core/src/openjdk/sun/sun/rmi/server/Util.java
trunk/core/src/openjdk/sun/sun/rmi/server/WeakClassHashMap.java
trunk/core/src/openjdk/sun/sun/rmi/server/resources/
trunk/core/src/openjdk/sun/sun/rmi/server/resources/rmid.properties
trunk/core/src/openjdk/sun/sun/rmi/server/resources/rmid_de.properties
trunk/core/src/openjdk/sun/sun/rmi/server/resources/rmid_es.properties
trunk/core/src/openjdk/sun/sun/rmi/server/resources/rmid_fr.properties
trunk/core/src/openjdk/sun/sun/rmi/server/resources/rmid_it.properties
trunk/core/src/openjdk/sun/sun/rmi/server/resources/rmid_ja.properties
trunk/core/src/openjdk/sun/sun/rmi/server/resources/rmid_ko.properties
trunk/core/src/openjdk/sun/sun/rmi/server/resources/rmid_sv.properties
trunk/core/src/openjdk/sun/sun/rmi/server/resources/rmid_zh_CN.properties
trunk/core/src/openjdk/sun/sun/rmi/server/resources/rmid_zh_TW.properties
trunk/core/src/openjdk/sun/sun/rmi/transport/
trunk/core/src/openjdk/sun/sun/rmi/transport/Channel.java
trunk/core/src/openjdk/sun/sun/rmi/transport/Connection.java
trunk/core/src/openjdk/sun/sun/rmi/transport/ConnectionInputStream.java
trunk/core/src/openjdk/sun/sun/rmi/transport/ConnectionOutputStream.java
trunk/core/src/openjdk/sun/sun/rmi/transport/DGCAckHandler.java
trunk/core/src/openjdk/sun/sun/rmi/transport/DGCClient.java
trunk/core/src/openjdk/sun/sun/rmi/transport/DGCImpl.java
trunk/core/src/openjdk/sun/sun/rmi/transport/Endpoint.java
trunk/core/src/openjdk/sun/sun/rmi/transport/LiveRef.java
trunk/core/src/openjdk/sun/sun/rmi/transport/ObjectEndpoint.java
trunk/core/src/openjdk/sun/sun/rmi/transport/ObjectTable.java
trunk/core/src/openjdk/sun/sun/rmi/transport/StreamRemoteCall.java
trunk/core/src/openjdk/sun/sun/rmi/transport/Target.java
trunk/core/src/openjdk/sun/sun/rmi/transport/Transport.java
trunk/core/src/openjdk/sun/sun/rmi/transport/TransportConstants.java
trunk/core/src/openjdk/sun/sun/rmi/transport/WeakRef.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/CGIHandler.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/HttpAwareServerSocket.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/HttpInputStream.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/HttpOutputStream.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/HttpReceiveSocket.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/HttpSendInputStream.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/HttpSendOutputStream.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/HttpSendSocket.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/RMIDirectSocketFactory.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/RMIHttpToCGISocketFactory.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/RMIHttpToPortSocketFactory.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/RMIMasterSocketFactory.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/RMISocketInfo.java
trunk/core/src/openjdk/sun/sun/rmi/transport/proxy/WrappedSocket.java
trunk/core/src/openjdk/sun/sun/rmi/transport/tcp/
trunk/core/src/openjdk/sun/sun/rmi/transport/tcp/ConnectionMultiplexer.java
trunk/core/src/openjdk/sun/sun/rmi/transport/tcp/MultiplexConnectionInfo.java
trunk/core/src/openjdk/sun/sun/rmi/transport/tcp/MultiplexInputStream.java
trunk/core/src/openjdk/sun/sun/rmi/transport/tcp/MultiplexOutputStream.java
trunk/core/src/openjdk/sun/sun/rmi/transport/tcp/TCPChannel.java
trunk/core/src/openjdk/sun/sun/rmi/transport/tcp/TCPConnection.java
trunk/core/src/openjdk/sun/sun/rmi/transport/tcp/TCPEndpoint.java
trunk/core/src/openjdk/sun/sun/rmi/transport/tcp/TCPTransport.java
trunk/core/src/openjdk/sun/sun/security/action/LoadLibraryAction.java
trunk/core/src/openjdk/vm/sun/rmi/
trunk/core/src/openjdk/vm/sun/rmi/server/
trunk/core/src/openjdk/vm/sun/rmi/server/NativeMarshalInputStream.java
Added: trunk/core/src/openjdk/java/java/rmi/AccessException.java
===================================================================
--- trunk/core/src/openjdk/java/java/rmi/AccessException.java (rev 0)
+++ trunk/core/src/openjdk/java/java/rmi/AccessException.java 2007-06-17 10:09:41 UTC (rev 3274)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 1996-1998 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.rmi;
+
+/**
+ * An <code>AccessException</code> is thrown by certain methods of the
+ * <code>java.rmi.Naming</code> class (specifically <code>bind</code>,
+ * <code>rebind</code>, and <code>unbind</code>) and methods of the
+ * <code>java.rmi.activation.ActivationSystem</code> interface to
+ * indicate that the caller does not have permission to perform the action
+ * requested by the method call. If the method was invoked from a non-local
+ * host, then an <code>AccessException</code> is thrown.
+ *
+ * @version 1.19, 05/05/07
+ * @author Ann Wollrath
+ * @author Roger Riggs
+ * @since JDK1.1
+ * @see java.rmi.Naming
+ * @see java.rmi.activation.ActivationSystem
+ */
+public class AccessException extends java.rmi.RemoteException {
+
+ /* indicate compatibility with JDK 1.1.x version of class */
+ private static final long serialVersionUID = 6314925228044966088L;
+
+ /**
+ * Constructs an <code>AccessException</code> with the specified
+ * detail message.
+ *
+ * @param s the detail message
+ * @since JDK1.1
+ */
+ public AccessException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructs an <code>AccessException</code> with the specified
+ * detail message and nested exception.
+ *
+ * @param s the detail message
+ * @param ex the nested exception
+ * @since JDK1.1
+ */
+ public AccessException(String s, Exception ex) {
+ super(s, ex);
+ }
+}
Added: trunk/core/src/openjdk/java/java/rmi/AlreadyBoundException.java
===================================================================
--- trunk/core/src/openjdk/java/java/rmi/AlreadyBoundException.java (rev 0)
+++ trunk/core/src/openjdk/java/java/rmi/AlreadyBoundException.java 2007-06-17 10:09:41 UTC (rev 3274)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 1996-1998 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package java.rmi;
+
+/**
+ * An <code>AlreadyBoundException</code> is thrown if an attempt
+ * is made to bind an object in the registry to a name that already
+ * has an associated binding.
+ *
+ * @version 1.19, 05/05/07
+ * @since JDK1.1
+ * @author Ann Wollrath
+ * @author Roger Riggs
+ * @see java.rmi.Naming#bind(String, java.rmi.Remote)
+ * @see java.rmi.registry.Registry#bind(String, java.rmi.Remote)
+ */
+public class AlreadyBoundException extends java.lang.Exception {
+
+ /* indicate compatibility with JDK 1.1.x version of class */
+ private static final long serialVersionUID = 9218657361741657110L;
+
+ /**
+ * Constructs an <code>AlreadyBoundException</code> with no
+ * specified detail message.
+ * @since JDK1.1
+ */
+ public AlreadyBoundException() {
+ super();
+ }
+
+ /**
+ * Constructs an <code>AlreadyBoundException</code> with the specified
+ * detail message.
+ *
+ * @param s the detail message
+ * @since JDK1.1
+ */
+ public AlreadyBoundException(String s) {
+ super(s);
+ }
+}
Added: trunk/core/src/openjdk/java/java/rmi/ConnectException.java
===================================================================
--- trunk/core/src/openjdk/java/java/rmi/ConnectException.java (rev 0)
+++ trunk/core/src/openjdk/java/java/rmi/ConnectException.java 2007-06-17 10:09:41 UTC (rev 3274)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 1996-1998 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.rmi;
+
+/**
+ * A <code>ConnectException</code> is thrown if a connection is refused
+ * to the remote host for a remote method call.
+ *
+ * @version 1.20, 05/05/07
+ * @author Ann Wollrath
+ * @since JDK1.1
+ */
+public class ConnectException extends RemoteException {
+
+ /* indicate compatibility with JDK 1.1.x version of class */
+ private static final long serialVersionUID = 4863550261346652506L;
+
+ /**
+ * Constructs a <code>ConnectException</code> with the specified
+ * detail message.
+ *
+ * @param s the detail message
+ * @since JDK1.1
+ */
+ public ConnectException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructs a <code>ConnectException</code> with the specified
+ * detail message and nested exception.
+ *
+ * @param s the detail message
+ * @param ex the nested exception
+ * @since JDK1.1
+ */
+ public ConnectException(String s, Exception ex) {
+ super(s, ex);
+ }
+}
Added: trunk/core/src/openjdk/java/java/rmi/ConnectIOException.java
===================================================================
--- trunk/core/src/openjdk/java/java/rmi/ConnectIOException.java (rev 0)
+++ trunk/core/src/openjdk/java/java/rmi/ConnectIOException.java 2007-06-17 10:09:41 UTC (rev 3274)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 1996-1998 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.rmi;
+
+/**
+ * A <code>ConnectIOException</code> is thrown if an
+ * <code>IOException</code> occurs while making a connection
+ * to the remote host for a remote method call.
+ *
+ * @version 1.19, 05/05/07
+ * @author Ann Wollrath
+ * @since JDK1.1
+ */
+public class ConnectIOException extends RemoteException {
+
+ /* indicate compatibility with JDK 1.1.x version of class */
+ private static final long serialVersionUID = -8087809532704668744L;
+
+ /**
+ * Constructs a <code>ConnectIOException</code> with the specified
+ * detail message.
+ *
+ * @param s the detail message
+ * @since JDK1.1
+ */
+ public ConnectIOException(String s) {
+ super(s);
+ }
+
+
+ /**
+ * Constructs a <code>ConnectIOException</code> with the specified
+ * detail message and nested exception.
+ *
+ * @param s the detail message
+ * @param ex the nested exception
+ * @since JDK1.1
+ */
+ public ConnectIOException(String s, Exception ex) {
+ super(s, ex);
+ }
+}
Added: trunk/core/src/openjdk/java/java/rmi/MarshalException.java
===================================================================
--- trunk/core/src/openjdk/java/java/rmi/MarshalException.java (rev 0)
+++ trunk/core/src/openjdk/java/java/rmi/MarshalException.java 2007-06-17 10:09:41 UTC (rev 3274)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 1996-1998 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.rmi;
+
+/**
+ * A <code>MarshalException</code> is thrown if a
+ * <code>java.io.IOException</code> occurs while marshalling the remote call
+ * header, arguments or return value for a remote method call. A
+ * <code>MarshalException</code> is also thrown if the receiver does not
+ * support the protocol version of the sender.
+ *
+ * <p>If a <code>MarshalException</code> occurs during a remote method call,
+ * the call may or may not have reached the server. If the call did reach the
+ * server, parameters may have been deserialized. A call may not be
+ * retransmitted after a <code>MarshalException</code> and reliably preserve
+ * "at most once" call semantics.
+ *
+ * @version 1.19, 05/05/07
+ * @author Ann Wollrath
+ * @since JDK1.1
+ */
+public class MarshalException extends RemoteException {
+
+ /* indicate compatibility with JDK 1.1.x version of class */
+ private static final long serialVersionUID = 6223554758134037936L;
+
+ /**
+ * Constructs a <code>MarshalException</code> with the specified
+ * detail message.
+ *
+ * @param s the detail message
+ * @since JDK1.1
+ */
+ public MarshalException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructs a <code>MarshalException</code> with the specified
+ * detail message and nested exception.
+ *
+ * @param s the detail message
+ * @param ex the nested exception
+ * @since JDK1.1
+ */
+ public MarshalException(String s, Exception ex) {
+ super(s, ex);
+ }
+}
Added: trunk/core/src/openjdk/java/java/rmi/MarshalledObject.java
===================================================================
--- trunk/core/src/openjdk/java/java/rmi/MarshalledObject.java (rev 0)
+++ trunk/core/src/openjdk/java/java/rmi/MarshalledObject.java 2007-06-17 10:09:41 UTC (rev 3274)
@@ -0,0 +1,317 @@
+/*
+ * Copyright 1997-2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.rmi;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.ObjectStreamConstants;
+import java.io.OutputStream;
+import java.io.Serializable;
+import sun.rmi.server.MarshalInputStream;
+import sun.rmi.server.MarshalOutputStream;
+
+/**
+ * A <code>MarshalledObject</code> contains a byte stream with the serialized
+ * representation of an object given to its constructor. The <code>get</code>
+ * method returns a new copy of the original object, as deserialized from
+ * the contained byte stream. The contained object is serialized and
+ * deserialized with the same serialization semantics used for marshaling
+ * and unmarshaling parameters and return values of RMI calls: When the
+ * serialized form is created:
+ *
+ * <ul>
+ * <li> classes are annotated with a codebase URL from where the class
+ * can be loaded (if available), and
+ * <li> any remote object in the <code>MarshalledObject</code> is
+ * represented by a serialized instance of its stub.
+ * </ul>
+ *
+ * <p>When copy of the object is retrieved (via the <code>get</code> method),
+ * if the class is not available locally, it will be loaded from the
+ * appropriate location (specified the URL annotated with the class descriptor
+ * when the class was serialized.
+ *
+ * <p><code>MarshalledObject</code> facilitates passing objects in RMI calls
+ * that are not automatically deserialized immediately by the remote peer.
+ *
+ * @param <T> the type of the object contained in this
+ * <code>MarshalledObject</code>
+ *
+ * @version 1.41, 05/05/07
+ * @author Ann Wollrath
+ * @author Peter Jones
+ * @since 1.2
+ */
+public final class MarshalledObject<T> implements Serializable {
+ /**
+ * @serial Bytes of serialized representation. If <code>objBytes</code> is
+ * <code>null</code> then the object marshalled was a <code>null</code>
+ * reference.
+ */
+ private byte[] objBytes = null;
+
+ /**
+ * @serial Bytes of location annotations, which are ignored by
+ * <code>equals</code>. If <code>locBytes</code> is null, there were no
+ * non-<code>null</code> annotations during marshalling.
+ */
+ private byte[] locBytes = null;
+
+ /**
+ * @serial Stored hash code of contained object.
+ *
+ * @see #hashCode
+ */
+ private int hash;
+
+ /** Indicate compatibility with 1.2 version of class. */
+ private static final long serialVersionUID = 8988374069173025854L;
+
+ /**
+ * Creates a new <code>MarshalledObject</code> that contains the
+ * serialized representation of the current state of the supplied object.
+ * The object is seri...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-21 19:33:42
|
Revision: 3284
http://jnode.svn.sourceforge.net/jnode/?rev=3284&view=rev
Author: lsantha
Date: 2007-06-21 12:33:38 -0700 (Thu, 21 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/com/com/sun/rowset/
trunk/core/src/openjdk/com/com/sun/rowset/CachedRowSetImpl.java
trunk/core/src/openjdk/com/com/sun/rowset/FilteredRowSetImpl.java
trunk/core/src/openjdk/com/com/sun/rowset/JdbcRowSetImpl.java
trunk/core/src/openjdk/com/com/sun/rowset/JdbcRowSetResourceBundle.java
trunk/core/src/openjdk/com/com/sun/rowset/JoinRowSetImpl.java
trunk/core/src/openjdk/com/com/sun/rowset/RowSetResourceBundle.properties
trunk/core/src/openjdk/com/com/sun/rowset/RowSetResourceBundle_de.properties
trunk/core/src/openjdk/com/com/sun/rowset/RowSetResourceBundle_es.properties
trunk/core/src/openjdk/com/com/sun/rowset/RowSetResourceBundle_fr.properties
trunk/core/src/openjdk/com/com/sun/rowset/RowSetResourceBundle_it.properties
trunk/core/src/openjdk/com/com/sun/rowset/RowSetResourceBundle_ja.properties
trunk/core/src/openjdk/com/com/sun/rowset/RowSetResourceBundle_ko.properties
trunk/core/src/openjdk/com/com/sun/rowset/RowSetResourceBundle_sv.properties
trunk/core/src/openjdk/com/com/sun/rowset/RowSetResourceBundle_zh_CN.properties
trunk/core/src/openjdk/com/com/sun/rowset/RowSetResourceBundle_zh_TW.properties
trunk/core/src/openjdk/com/com/sun/rowset/WebRowSetImpl.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/
trunk/core/src/openjdk/com/com/sun/rowset/internal/BaseRow.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/CachedRowSetReader.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/CachedRowSetWriter.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/InsertRow.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/Row.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/SyncResolverImpl.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/WebRowSetXmlReader.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/WebRowSetXmlWriter.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/XmlErrorHandler.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/XmlReaderContentHandler.java
trunk/core/src/openjdk/com/com/sun/rowset/internal/XmlResolver.java
trunk/core/src/openjdk/com/com/sun/rowset/package.html
trunk/core/src/openjdk/com/com/sun/rowset/providers/
trunk/core/src/openjdk/com/com/sun/rowset/providers/RIOptimisticProvider.java
trunk/core/src/openjdk/com/com/sun/rowset/providers/RIXMLProvider.java
trunk/core/src/openjdk/com/com/sun/rowset/providers/package.html
trunk/core/src/openjdk/sun/sun/security/util/Debug.java
trunk/core/src/openjdk/sun/sun/security/util/PropertyExpander.java
Added: trunk/core/src/openjdk/com/com/sun/rowset/CachedRowSetImpl.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/rowset/CachedRowSetImpl.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/rowset/CachedRowSetImpl.java 2007-06-21 19:33:38 UTC (rev 3284)
@@ -0,0 +1,10134 @@
+/*
+ * Copyright 2003-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.rowset;
+
+import java.sql.*;
+import javax.sql.*;
+import java.io.*;
+import java.math.*;
+import java.util.*;
+import java.text.*;
+
+import javax.sql.rowset.*;
+import javax.sql.rowset.spi.*;
+import javax.sql.rowset.serial.*;
+import com.sun.rowset.internal.*;
+import com.sun.rowset.providers.*;
+
+/**
+ * The standard implementation of the <code>CachedRowSet</code> interface.
+ *
+ * See interface defintion for full behaviour and implementation requirements.
+ * This reference implementation has made provision for a one-to-one write back
+ * facility and it is curremtly be possible to change the peristence provider
+ * during the life-time of any CachedRowSetImpl.
+ *
+ * @author Jonathan Bruce, Amit Handa
+ */
+
+public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetInternal, Serializable, Cloneable, CachedRowSet {
+
+ /**
+ * The <code>SyncProvider</code> used by the CachedRowSet
+ */
+ private SyncProvider provider;
+
+ /**
+ * The <code>RowSetReaderImpl</code> object that is the reader
+ * for this rowset. The method <code>execute</code> uses this
+ * reader as part of its implementation.
+ * @serial
+ */
+ private RowSetReader rowSetReader;
+
+ /**
+ * The <code>RowSetWriterImpl</code> object that is the writer
+ * for this rowset. The method <code>acceptChanges</code> uses
+ * this writer as part of its implementation.
+ * @serial
+ */
+ private RowSetWriter rowSetWriter;
+
+ /**
+ * The <code>Connection</code> object that connects with this
+ * <code>CachedRowSetImpl</code> object's current underlying data source.
+ */
+ private transient Connection conn;
+
+ /**
+ * The <code>ResultSetMetaData</code> object that contains information
+ * about the columns in the <code>ResultSet</code> object that is the
+ * current source of data for this <code>CachedRowSetImpl</code> object.
+ */
+ private transient ResultSetMetaData RSMD;
+
+ /**
+ * The <code>RowSetMetaData</code> object that contains information about
+ * the columns in this <code>CachedRowSetImpl</code> object.
+ * @serial
+ */
+ private RowSetMetaDataImpl RowSetMD;
+
+ // Properties of this RowSet
+
+ /**
+ * An array containing the columns in this <code>CachedRowSetImpl</code>
+ * object that form a unique identifier for a row. This array
+ * is used by the writer.
+ * @serial
+ */
+ private int keyCols[];
+
+ /**
+ * The name of the table in the underlying database to which updates
+ * should be written. This name is needed because most drivers
+ * do not return this information in a <code>ResultSetMetaData</code>
+ * object.
+ * @serial
+ */
+ private String tableName;
+
+
+ /**
+ * A <code>Vector</code> object containing the <code>Row</code>
+ * objects that comprise this <code>CachedRowSetImpl</code> object.
+ * @serial
+ */
+ private Vector rvh;
+ /**
+ * The current postion of the cursor in this <code>CachedRowSetImpl</code>
+ * object.
+ * @serial
+ */
+ private int cursorPos;
+
+ /**
+ * The current postion of the cursor in this <code>CachedRowSetImpl</code>
+ * object not counting rows that have been deleted, if any.
+ * <P>
+ * For example, suppose that the cursor is on the last row of a rowset
+ * that started with five rows and subsequently had the second and third
+ * rows deleted. The <code>absolutePos</code> would be <code>3</code>,
+ * whereas the <code>cursorPos</code> would be <code>5</code>.
+ * @serial
+ */
+ private int absolutePos;
+
+ /**
+ * The number of deleted rows currently in this <code>CachedRowSetImpl</code>
+ * object.
+ * @serial
+ */
+ private int numDeleted;
+
+ /**
+ * The total number of rows currently in this <code>CachedRowSetImpl</code>
+ * object.
+ * @serial
+ */
+ private int numRows;
+
+ /**
+ * A special row used for constructing a new row. A new
+ * row is constructed by using <code>ResultSet.updateXXX</code>
+ * methods to insert column values into the insert row.
+ * @serial
+ */
+ private InsertRow insertRow;
+
+ /**
+ * A <code>boolean</code> indicating whether the cursor is
+ * currently on the insert row.
+ * @serial
+ */
+ private boolean onInsertRow;
+
+ /**
+ * The field that temporarily holds the last position of the
+ * cursor before it moved to the insert row, thus preserving
+ * the number of the current row to which the cursor may return.
+ * @serial
+ */
+ private int currentRow;
+
+ /**
+ * A <code>boolean</code> indicating whether the last value
+ * returned was an SQL <code>NULL</code>.
+ * @serial
+ */
+ private boolean lastValueNull;
+
+ /**
+ * A <code>SQLWarning</code> which logs on the warnings
+ */
+ private SQLWarning sqlwarn;
+
+ /**
+ * Used to track match column for JoinRowSet consumption
+ */
+ private String strMatchColumn ="";
+
+ /**
+ * Used to track match column for JoinRowSet consumption
+ */
+ private int iMatchColumn = -1;
+
+ /**
+ * A <code>RowSetWarning</code> which logs on the warnings
+ */
+ private RowSetWarning rowsetWarning;
+
+ /**
+ * The default SyncProvider for the RI CachedRowSetImpl
+ */
+ private String DEFAULT_SYNC_PROVIDER = "com.sun.rowset.providers.RIOptimisticProvider";
+
+ /**
+ * The boolean variable indicating locatorsUpdateValue
+ */
+ private boolean dbmslocatorsUpdateCopy;
+
+ /**
+ * The <code>ResultSet</code> object that is used to maintain the data when
+ * a ResultSet and start position are passed as parameters to the populate function
+ */
+ private ResultSet resultSet;
+
+ /**
+ * The integer value indicating the end position in the ResultSetwhere the picking
+ * up of rows for populating a CachedRowSet object was left off.
+ */
+ private int endPos;
+
+ /**
+ * The integer value indicating the end position in the ResultSetwhere the picking
+ * up of rows for populating a CachedRowSet object was left off.
+ */
+ private int prevEndPos;
+
+ /**
+ * The integer value indicating the position in the ResultSet, to populate the
+ * CachedRowSet object.
+ */
+ private int startPos;
+
+ /**
+ * The integer value indicating the positon from where the page prior to this
+ * was populated.
+ */
+ private int startPrev;
+
+ /**
+ * The integer value indicating size of the page.
+ */
+ private int pageSize;
+
+ /**
+ * The integer value indicating number of rows that have been processed so far.
+ * Used for checking whether maxRows has been reached or not.
+ */
+ private int maxRowsreached;
+ /**
+ * The boolean value when true signifies that pages are still to follow and a
+ * false value indicates that this is the last page.
+ */
+ private boolean pagenotend = true;
+
+ /**
+ * The boolean value indicating whether this is the first page or not.
+ */
+ private boolean onFirstPage;
+
+ /**
+ * The boolean value indicating whether this is the last page or not.
+ */
+ private boolean onLastPage;
+
+ /**
+ * The integer value indicating how many times the populate function has been called.
+ */
+ private int populatecallcount;
+
+ /**
+ * The integer value indicating the total number of rows to be processed in the
+ * ResultSet object passed to the populate function.
+ */
+ private int totalRows;
+
+ /**
+ * The boolean value indicating how the CahedRowSet object has been populated for
+ * paging purpose. True indicates that connection parameter is passed.
+ */
+ private boolean callWithCon;
+
+ /**
+ * CachedRowSet reader object to read the data from the ResultSet when a connection
+ * parameter is passed to populate the CachedRowSet object for paging.
+ */
+ private CachedRowSetReader crsReader;
+
+ /**
+ * The Vector holding the Match Columns
+ */
+ private Vector iMatchColumns;
+
+ /**
+ * The Vector that will hold the Match Column names.
+ */
+ private Vector strMatchColumns;
+
+ /**
+ * Trigger that indicates whether the active SyncProvider is exposes the
+ * additional TransactionalWriter method
+ */
+ private boolean tXWriter = false;
+
+ /**
+ * The field object for a transactional RowSet writer
+ */
+ private TransactionalWriter tWriter = null;
+
+ private transient JdbcRowSetResourceBundle resBundle;
+
+
+
+ /**
+ * Constructs a new default <code>CachedRowSetImpl</code> object with
+ * the capacity to hold 100 rows. This new object has no metadata
+ * and has the following default values:
+ * <pre>
+ * onInsertRow = false
+ * insertRow = null
+ * cursorPos = 0
+ * numRows = 0
+ * showDeleted = false
+ * queryTimeout = 0
+ * maxRows = 0
+ * maxFieldSize = 0
+ * rowSetType = ResultSet.TYPE_SCROLL_INSENSITIVE
+ * concurrency = ResultSet.CONCUR_UPDATABLE
+ * readOnly = false
+ * isolation = Connection.TRANSACTION_READ_COMMITTED
+ * escapeProcessing = true
+ * onInsertRow = false
+ * insertRow = null
+ * cursorPos = 0
+ * absolutePos = 0
+ * numRows = 0
+ * </pre>
+ * A <code>CachedRowSetImpl</code> object is configured to use the default
+ * <code>RIOptimisticProvider</code> implementation to provide connectivity
+ * and synchronization capabilities to the set data source.
+ * <P>
+ * @throws SQLException if an error occurs
+ */
+ public CachedRowSetImpl() throws SQLException {
+
+ try {
+ resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
+ } catch(IOException ioe) {
+
+ }
+
+ // set the Reader, this maybe overridden latter
+ provider =
+ (SyncProvider)SyncFactory.getInstance(DEFAULT_SYNC_PROVIDER);
+
+ if (!(provider instanceof RIOptimisticProvider)) {
+ throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.invalidp").toString());
+ }
+
+ rowSetReader = (CachedRowSetReader)provider.getRowSetReader();
+ rowSetWriter = (CachedRowSetWriter)provider.getRowSetWriter();
+
+ // allocate the parameters collection
+ initParams();
+
+ initContainer();
+
+ // set up some default values
+ initProperties();
+
+ // insert row setup
+ onInsertRow = false;
+ insertRow = null;
+
+ // set the warninings
+ sqlwarn = new SQLWarning();
+ rowsetWarning = new RowSetWarning();
+
+ }
+
+ /**
+ * Provides a <code>CachedRowSetImpl</code> instance with the same default properties as
+ * as the zero parameter constructor.
+ * <pre>
+ * onInsertRow = false
+ * insertRow = null
+ * cursorPos = 0
+ * numRows = 0
+ * showDeleted = false
+ * queryTimeout = 0
+ * maxRows = 0
+ * maxFieldSize = 0
+ * rowSetType = ResultSet.TYPE_SCROLL_INSENSITIVE
+ * concurrency = ResultSet.CONCUR_UPDATABLE
+ * readOnly = false
+ * isolation = Connection.TRANSACTION_READ_COMMITTED
+ * escapeProcessing = true
+ * onInsertRow = false
+ * insertRow = null
+ * cursorPos = 0
+ * absolutePos = 0
+ * numRows = 0
+ * </pre>
+ *
+ * However, applications will have the means to specify at runtime the
+ * desired <code>SyncProvider</code> object.
+ * <p>
+ * For example, creating a <code>CachedRowSetImpl</code> object as follows ensures
+ * that a it is established with the <code>com.foo.provider.Impl</code> synchronization
+ * implementation providing the synchronization mechanism for this disconnected
+ * <code>RowSet</code> object.
+ * <pre>
+ * Hashtable env = new Hashtable();
+ * env.put(javax.sql.rowset.spi.SyncFactory.ROWSET_PROVIDER_NAME,
+ * "com.foo.provider.Impl");
+ * CachedRowSetImpl crs = new CachedRowSet(env);
+ * </pre>
+ * <p>
+ * Calling this constructor with a <code>null</code> parameter will
+ * cause the <code>SyncFactory</code> to provide the reference
+ * optimistic provider <code>com.sun.rowset.providers.RIOptimisticProvider</code>.
+ * <p>
+ * In addition, the following properties can be associated with the
+ * provider to assist in determining the choice of the synchronizaton
+ * provider such as:
+ * <ul>
+ * <li><code>ROWSET_SYNC_PROVIDER</code> - the property specifying the the
+ * <code>SyncProvider</code> class name to be instantiated by the
+ * <code>SyncFacttory</code>
+ * <li><code>ROWSET_SYNC_VENDOR</code> - the property specifying the software
+ * vendor associated with a <code>SyncProvider</code> implementation.
+ * <li><code>ROWSET_SYNC_PROVIDER_VER</code> - the property specifying the
+ * version of the <code>SyncProvider</code> implementation provided by the
+ * software vendor.
+ * </ul>
+ * More specific detailes are available in the <code>SyncFactory</code>
+ * and <code>SyncProvider</code> specificiations later in this document.
+ * <p>
+ * @param env a <code>Hashtable</code> object with a list of desired
+ * synchronization providers
+ * @throws SQLException if the requested provider cannot be found by the
+ * synchonization factory
+ * @see SyncProvider
+ */
+
+ public CachedRowSetImpl(Hashtable env) throws SQLException {
+
+
+ try {
+ resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
+ } catch(IOException ioe) {
+ }
+
+
+ if (env == null) {
+ throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.nullhash").toString());
+ }
+
+ String providerName = (String)env.get(
+ javax.sql.rowset.spi.SyncFactory.ROWSET_SYNC_PROVIDER);
+
+ // set the Reader, this maybe overridden latter
+ provider =
+ (SyncProvider)SyncFactory.getInstance(providerName);
+
+ rowSetReader = provider.getRowSetReader();
+ rowSetWriter = provider.getRowSetWriter();
+
+ initParams(); // allocate the parameters collection
+ initContainer();
+ initProperties(); // set up some default values
+
+ // insert row setup
+ onInsertRow = false;
+ insertRow = null;
+
+ }
+
+ /**
+ * Sets the <code>rvh</code> field to a new <code>Vector</code>
+ * object with a capacity of 100 and sets the
+ * <code>cursorPos</code> and <code>numRows</code> fields to zero.
+ */
+ private void initContainer() {
+
+ rvh = new Vector(100);
+ cursorPos = 0;
+ absolutePos = 0;
+ numRows = 0;
+ numDeleted = 0;
+ }
+
+ /**
+ * Sets the properties for this <code>CachedRowSetImpl</code> object to
+ * their default values. This method is called internally by the
+ * default constructor.
+ */
+
+ private void initProperties() throws SQLException {
+
+ try {
+ resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
+ } catch(IOException ioe) {
+ }
+ setShowDeleted(false);
+ setQueryTimeout(0);
+ setMaxRows(0);
+ setMaxFieldSize(0);
+ setType(ResultSet.TYPE_SCROLL_INSENSITIVE);
+ setConcurrency(ResultSet.CONCUR_UPDATABLE);
+ if((rvh.size() > 0) && (isReadOnly() == false))
+ setReadOnly(false);
+ else
+ setReadOnly(true);
+ setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
+ setEscapeProcessing(true);
+ setTypeMap(null);
+ checkTransactionalWriter();
+
+ //Instantiating the vector for MatchColumns
+
+ iMatchColumns = new Vector(10);
+ for(int i = 0; i < 10 ; i++) {
+ iMatchColumns.add(i,new Integer(-1));
+ }
+
+ strMatchColumns = new Vector(10);
+ for(int j = 0; j < 10; j++) {
+ strMatchColumns.add(j,null);
+ }
+ }
+
+ /**
+ * Determine whether the SyncProvider's writer implements the
+ * <code>TransactionalWriter<code> interface
+ */
+ private void checkTransactionalWriter() {
+ if (rowSetWriter != null) {
+ Class c = rowSetWriter.getClass();
+ if (c != null) {
+ Class[] theInterfaces = c.getInterfaces();
+ for (int i = 0; i < theInterfaces.length; i++) {
+ if ((theInterfaces[i].getName()).indexOf("TransactionalWriter") > 0) {
+ tXWriter = true;
+ establishTransactionalWriter();
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets an private field to all transaction bounddaries to be set
+ */
+ private void establishTransactionalWriter() {
+ tWriter = (TransactionalWriter)provider.getRowSetWriter();
+ }
+
+ //-----------------------------------------------------------------------
+ // Properties
+ //-----------------------------------------------------------------------
+
+ /**
+ * Sets this <code>CachedRowSetImpl</code> object's command property
+ * to the given <code>String</code> object and clears the parameters,
+ * if any, that were set for the previous command.
+ * <P>
+ * The command property may not be needed
+ * if the rowset is produced by a data source, such as a spreadsheet,
+ * that does not support commands. Thus, this property is optional
+ * and may be <code>null</code>.
+ *
+ * @param cmd a <code>String</code> object containing an SQL query
+ * that will be set as the command; may be <code>null</code>
+ * @throws SQLException if an error occurs
+ */
+ public void setCommand(String cmd) throws SQLException {
+
+ super.setCommand(cmd);
+
+ if(!buildTableName(cmd).equals("")) {
+ this.setTableName(buildTableName(cmd));
+ }
+ }
+
+
+ //---------------------------------------------------------------------
+ // Reading and writing data
+ //---------------------------------------------------------------------
+
+ /**
+ * Populates this <code>CachedRowSetImpl</code> object with data from
+ * the given <code>ResultSet</code> object. This
+ * method is an alternative to the method <code>execute</code>
+ * for filling the rowset with data. The method <code>populate</code>
+ * does not require that the properties needed by the method
+ * <code>execute</code>, such as the <code>command</code> property,
+ * be set. This is true because the method <code>populate</code>
+ * is given the <code>ResultSet</code> object from
+ * which to get data and thus does not need to use the properties
+ * required for setting up a connection and executing this
+ * <code>CachedRowSetImpl</code> object's command.
+ * <P>
+ * After populating this rowset with data, the method
+ * <code>populate</code> sets the rowset's metadata and
+ * then sends a <code>RowSetChangedEvent</code> object
+ * to all registered listeners prior to returning.
+ *
+ * @param data the <code>ResultSet</code> object containing the data
+ * to be read into this <code>CachedRowSetImpl</code> object
+ * @throws SQLException if an error occurs; or the max row setting is
+ * violated while populating the RowSet
+ * @see #execute
+ */
+ public void populate(ResultSet data) throws SQLException {
+ int rowsFetched;
+ Row currentRow;
+ int numCols;
+ int i;
+ Map map = getTypeMap();
+ Object obj;
+ int mRows;
+
+ if (data == null) {
+ throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.populate").toString());
+ }
+
+
+ // get the meta data for this ResultSet
+ RSMD = data.getMetaData();
+
+ // set up the metadata
+ RowSetMD = new RowSetMetaDataImpl();
+ initMetaData(RowSetMD, RSMD);
+
+ // release the meta-data so that aren't tempted to use it.
+ RSMD = null;
+ numCols = RowSetMD.getColumnCount();
+ mRows = this.getMaxRows();
+ rowsFetched = 0;
+ currentRow = null;
+
+ while ( data.next()) {
+
+ currentRow = new Row(numCols);
+
+ if ( rowsFetched > mRows && mRows > 0) {
+ rowsetWarning.setNextWarning(new RowSetWarning("Populating rows "
+ + "setting has exceeded max row setting"));
+ }
+ for ( i = 1; i <= numCols; i++) {
+ /*
+ * check if the user has set a map. If no map
+ * is set then use plain getObject. This lets
+ * us work with drivers that do not support
+ * getObject with a map in fairly sensible way
+ */
+ if (map == null) {
+ obj = data.getObject(i);
+ } else {
+ obj = data.getObject(i, map);
+ }
+ /*
+ * the following block checks for the various
+ * types that we have to serialize in order to
+ * store - right now only structs have been tested
+ */
+ if (obj instanceof Struct) {
+ obj = new SerialStruct((Struct)obj, map);
+ } else if (obj instanceof SQLData) {
+ obj = new SerialStruct((SQLData)obj, map);
+ } else if (obj instanceof Blob) {
+ obj = new SerialBlob((Blob)obj);
+ } else if (obj instanceof Clob) {
+ obj = new SerialClob((Clob)obj);
+ } else if (obj instanceof java.sql.Array) {
+ obj = new SerialArray((java.sql.Array)obj, map);
+ }
+
+ ((Row)currentRow).initColumnObject(i, obj);
+ }
+ rowsFetched++;
+ rvh.add(currentRow);
+ }
+
+ numRows = rowsFetched ;
+ // Also rowsFetched should be equal to rvh.size()
+
+ // notify any listeners that the rowset has changed
+ notifyRowSetChanged();
+
+
+ }
+
+ /**
+ * Initializes the given <code>RowSetMetaData</code> object with the values
+ * in the given <code>ResultSetMetaData</code> object.
+ *
+ * @param md the <code>RowSetMetaData</code> object for this
+ * <code>CachedRowSetImpl</code> object, which will be set with
+ * values from rsmd
+ * @param rsmd the <code>ResultSetMetaData</code> object from which new
+ * values for md will be read
+ * @throws SQLException if an error occurs
+ */
+ private void initMetaData(RowSetMetaDataImpl md, ResultSetMetaData rsmd) throws SQLException {
+ int numCols = rsmd.getColumnCount();
+
+ md.setColumnCount(numCols);
+ for (int col=1; col <= numCols; col++) {
+ md.setAutoIncrement(col, rsmd.isAutoIncrement(col));
+ md.setCaseSensitive(col, rsmd.isCaseSensitive(col));
+ md.setCurrency(col, rsmd.isCurrency(col));
+ md.setNullable(col, rsmd.isNullable(col));
+ md.setSigned(col, rsmd.isSigned(col));
+ md.setSearchable(col, rsmd.isSearchable(col));
+ md.setColumnDisplaySize(col, rsmd.getColumnDisplaySize(col));
+ md.setColumnLabel(col, rsmd.getColumnLabel(col));
+ md.setColumnName(col, rsmd.getColumnName(col));
+ md.setSchemaName(col, rsmd.getSchemaName(col));
+ md.setPrecision(col, rsmd.getPrecision(col));
+ md.setScale(col, rsmd.getScale(col));
+ md.setTableName(col, rsmd.getTableName(col));
+ md.setCatalogName(col, rsmd.getCatalogName(col));
+ md.setColumnType(col, rsmd.getColumnType(col));
+ md.setColumnTypeName(col, rsmd.getColumnTypeName(col));
+
+ if( conn != null){
+
+ try {
+ dbmslocatorsUpdateCopy = conn.getMetaData().locatorsUpdateCopy();
+ } catch(SQLException sqle) {
+ /*
+ * Since the Lobs and this method is not mandated by J2EE spec,
+ * drivers are not implementing it. We need to catch this
+ * and do nothing in this block and help populate()
+ * method do it's task(bug id 5055528)
+ */
+ }
+ }
+ }
+ }
+
+ /**
+ * Populates this <code>CachedRowSetImpl</code> object with data,
+ * using the given connection to produce the result set from
+ * which data will be read. A second form of this method,
+ * which takes no arguments, uses the values from this rowset's
+ * user, password, and either url or data source properties to
+ * create a new database connection. T...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-25 10:56:50
|
Revision: 3310
http://jnode.svn.sourceforge.net/jnode/?rev=3310&view=rev
Author: lsantha
Date: 2007-06-25 03:56:45 -0700 (Mon, 25 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/org/
trunk/core/src/openjdk/org/org/
trunk/core/src/openjdk/org/org/ietf/
trunk/core/src/openjdk/org/org/ietf/jgss/
trunk/core/src/openjdk/org/org/ietf/jgss/ChannelBinding.java
trunk/core/src/openjdk/org/org/ietf/jgss/GSSContext.java
trunk/core/src/openjdk/org/org/ietf/jgss/GSSCredential.java
trunk/core/src/openjdk/org/org/ietf/jgss/GSSException.java
trunk/core/src/openjdk/org/org/ietf/jgss/GSSManager.java
trunk/core/src/openjdk/org/org/ietf/jgss/GSSName.java
trunk/core/src/openjdk/org/org/ietf/jgss/MessageProp.java
trunk/core/src/openjdk/org/org/ietf/jgss/Oid.java
trunk/core/src/openjdk/org/org/ietf/jgss/package.html
trunk/core/src/openjdk/org/org/jcp/
trunk/core/src/openjdk/org/org/jcp/xml/
trunk/core/src/openjdk/org/org/jcp/xml/dsig/
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/DigesterOutputStream.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/MacOutputStream.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/SignerOutputStream.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/ApacheData.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/ApacheTransform.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMBase64Transform.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMKeyName.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMManifest.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMPGPData.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMReference.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMStructure.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMTransform.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMUtils.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMX509Data.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXPathTransform.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXSLTTransform.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/Utils.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java
trunk/core/src/openjdk/org/org/jcp/xml/dsig/internal/package.html
trunk/core/src/openjdk/org/org/omg/
trunk/core/src/openjdk/org/org/omg/CORBA/
trunk/core/src/openjdk/org/org/omg/CORBA/ACTIVITY_COMPLETED.java
trunk/core/src/openjdk/org/org/omg/CORBA/ACTIVITY_REQUIRED.java
trunk/core/src/openjdk/org/org/omg/CORBA/ARG_IN.java
trunk/core/src/openjdk/org/org/omg/CORBA/ARG_INOUT.java
trunk/core/src/openjdk/org/org/omg/CORBA/ARG_OUT.java
trunk/core/src/openjdk/org/org/omg/CORBA/Any.java
trunk/core/src/openjdk/org/org/omg/CORBA/AnyHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/AnySeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/AnySeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/BAD_CONTEXT.java
trunk/core/src/openjdk/org/org/omg/CORBA/BAD_INV_ORDER.java
trunk/core/src/openjdk/org/org/omg/CORBA/BAD_OPERATION.java
trunk/core/src/openjdk/org/org/omg/CORBA/BAD_PARAM.java
trunk/core/src/openjdk/org/org/omg/CORBA/BAD_POLICY.java
trunk/core/src/openjdk/org/org/omg/CORBA/BAD_POLICY_TYPE.java
trunk/core/src/openjdk/org/org/omg/CORBA/BAD_POLICY_VALUE.java
trunk/core/src/openjdk/org/org/omg/CORBA/BAD_QOS.java
trunk/core/src/openjdk/org/org/omg/CORBA/BAD_TYPECODE.java
trunk/core/src/openjdk/org/org/omg/CORBA/BooleanHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/BooleanSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/BooleanSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/Bounds.java
trunk/core/src/openjdk/org/org/omg/CORBA/ByteHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/CODESET_INCOMPATIBLE.java
trunk/core/src/openjdk/org/org/omg/CORBA/COMM_FAILURE.java
trunk/core/src/openjdk/org/org/omg/CORBA/CTX_RESTRICT_SCOPE.java
trunk/core/src/openjdk/org/org/omg/CORBA/CharHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/CharSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/CharSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/CompletionStatus.java
trunk/core/src/openjdk/org/org/omg/CORBA/CompletionStatusHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/Context.java
trunk/core/src/openjdk/org/org/omg/CORBA/ContextList.java
trunk/core/src/openjdk/org/org/omg/CORBA/Current.java
trunk/core/src/openjdk/org/org/omg/CORBA/CurrentHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/CurrentHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/CurrentOperations.java
trunk/core/src/openjdk/org/org/omg/CORBA/CustomMarshal.java
trunk/core/src/openjdk/org/org/omg/CORBA/DATA_CONVERSION.java
trunk/core/src/openjdk/org/org/omg/CORBA/DataInputStream.java
trunk/core/src/openjdk/org/org/omg/CORBA/DataOutputStream.java
trunk/core/src/openjdk/org/org/omg/CORBA/DefinitionKind.java
trunk/core/src/openjdk/org/org/omg/CORBA/DefinitionKindHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/DomainManager.java
trunk/core/src/openjdk/org/org/omg/CORBA/DomainManagerOperations.java
trunk/core/src/openjdk/org/org/omg/CORBA/DoubleHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/DoubleSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/DoubleSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynAny.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynAnyPackage/
trunk/core/src/openjdk/org/org/omg/CORBA/DynAnyPackage/Invalid.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynAnyPackage/InvalidSeq.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynAnyPackage/InvalidValue.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynAnyPackage/TypeMismatch.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynAnyPackage/package.html
trunk/core/src/openjdk/org/org/omg/CORBA/DynArray.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynEnum.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynFixed.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynSequence.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynStruct.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynUnion.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynValue.java
trunk/core/src/openjdk/org/org/omg/CORBA/DynamicImplementation.java
trunk/core/src/openjdk/org/org/omg/CORBA/Environment.java
trunk/core/src/openjdk/org/org/omg/CORBA/ExceptionList.java
trunk/core/src/openjdk/org/org/omg/CORBA/FREE_MEM.java
trunk/core/src/openjdk/org/org/omg/CORBA/FieldNameHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/FixedHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/FloatHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/FloatSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/FloatSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/IDLType.java
trunk/core/src/openjdk/org/org/omg/CORBA/IDLTypeHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/IDLTypeOperations.java
trunk/core/src/openjdk/org/org/omg/CORBA/IMP_LIMIT.java
trunk/core/src/openjdk/org/org/omg/CORBA/INITIALIZE.java
trunk/core/src/openjdk/org/org/omg/CORBA/INTERNAL.java
trunk/core/src/openjdk/org/org/omg/CORBA/INTF_REPOS.java
trunk/core/src/openjdk/org/org/omg/CORBA/INVALID_ACTIVITY.java
trunk/core/src/openjdk/org/org/omg/CORBA/INVALID_TRANSACTION.java
trunk/core/src/openjdk/org/org/omg/CORBA/INV_FLAG.java
trunk/core/src/openjdk/org/org/omg/CORBA/INV_IDENT.java
trunk/core/src/openjdk/org/org/omg/CORBA/INV_OBJREF.java
trunk/core/src/openjdk/org/org/omg/CORBA/INV_POLICY.java
trunk/core/src/openjdk/org/org/omg/CORBA/IRObject.java
trunk/core/src/openjdk/org/org/omg/CORBA/IRObjectOperations.java
trunk/core/src/openjdk/org/org/omg/CORBA/IdentifierHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/IntHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/LocalObject.java
trunk/core/src/openjdk/org/org/omg/CORBA/LongHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/LongLongSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/LongLongSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/LongSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/LongSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/MARSHAL.java
trunk/core/src/openjdk/org/org/omg/CORBA/NO_IMPLEMENT.java
trunk/core/src/openjdk/org/org/omg/CORBA/NO_MEMORY.java
trunk/core/src/openjdk/org/org/omg/CORBA/NO_PERMISSION.java
trunk/core/src/openjdk/org/org/omg/CORBA/NO_RESOURCES.java
trunk/core/src/openjdk/org/org/omg/CORBA/NO_RESPONSE.java
trunk/core/src/openjdk/org/org/omg/CORBA/NVList.java
trunk/core/src/openjdk/org/org/omg/CORBA/NameValuePair.java
trunk/core/src/openjdk/org/org/omg/CORBA/NameValuePairHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/NamedValue.java
trunk/core/src/openjdk/org/org/omg/CORBA/OBJECT_NOT_EXIST.java
trunk/core/src/openjdk/org/org/omg/CORBA/OBJ_ADAPTER.java
trunk/core/src/openjdk/org/org/omg/CORBA/OMGVMCID.java
trunk/core/src/openjdk/org/org/omg/CORBA/ORB.java
trunk/core/src/openjdk/org/org/omg/CORBA/ORBPackage/
trunk/core/src/openjdk/org/org/omg/CORBA/ORBPackage/InconsistentTypeCode.java
trunk/core/src/openjdk/org/org/omg/CORBA/ORBPackage/InvalidName.java
trunk/core/src/openjdk/org/org/omg/CORBA/ORBPackage/package.html
trunk/core/src/openjdk/org/org/omg/CORBA/Object.java
trunk/core/src/openjdk/org/org/omg/CORBA/ObjectHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/ObjectHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/OctetSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/OctetSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/PERSIST_STORE.java
trunk/core/src/openjdk/org/org/omg/CORBA/PRIVATE_MEMBER.java
trunk/core/src/openjdk/org/org/omg/CORBA/PUBLIC_MEMBER.java
trunk/core/src/openjdk/org/org/omg/CORBA/Policy.java
trunk/core/src/openjdk/org/org/omg/CORBA/PolicyError.java
trunk/core/src/openjdk/org/org/omg/CORBA/PolicyHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/PolicyHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/PolicyListHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/PolicyListHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/PolicyOperations.java
trunk/core/src/openjdk/org/org/omg/CORBA/PolicyTypeHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/Principal.java
trunk/core/src/openjdk/org/org/omg/CORBA/PrincipalHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/REBIND.java
trunk/core/src/openjdk/org/org/omg/CORBA/RepositoryIdHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/Request.java
trunk/core/src/openjdk/org/org/omg/CORBA/ServerRequest.java
trunk/core/src/openjdk/org/org/omg/CORBA/ServiceDetail.java
trunk/core/src/openjdk/org/org/omg/CORBA/ServiceDetailHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/ServiceInformation.java
trunk/core/src/openjdk/org/org/omg/CORBA/ServiceInformationHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/ServiceInformationHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/SetOverrideType.java
trunk/core/src/openjdk/org/org/omg/CORBA/SetOverrideTypeHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/ShortHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/ShortSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/ShortSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/StringHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/StringValueHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/StructMember.java
trunk/core/src/openjdk/org/org/omg/CORBA/StructMemberHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/SystemException.java
trunk/core/src/openjdk/org/org/omg/CORBA/TCKind.java
trunk/core/src/openjdk/org/org/omg/CORBA/TIMEOUT.java
trunk/core/src/openjdk/org/org/omg/CORBA/TRANSACTION_MODE.java
trunk/core/src/openjdk/org/org/omg/CORBA/TRANSACTION_REQUIRED.java
trunk/core/src/openjdk/org/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java
trunk/core/src/openjdk/org/org/omg/CORBA/TRANSACTION_UNAVAILABLE.java
trunk/core/src/openjdk/org/org/omg/CORBA/TRANSIENT.java
trunk/core/src/openjdk/org/org/omg/CORBA/TypeCode.java
trunk/core/src/openjdk/org/org/omg/CORBA/TypeCodeHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/TypeCodePackage/
trunk/core/src/openjdk/org/org/omg/CORBA/TypeCodePackage/BadKind.java
trunk/core/src/openjdk/org/org/omg/CORBA/TypeCodePackage/Bounds.java
trunk/core/src/openjdk/org/org/omg/CORBA/TypeCodePackage/package.html
trunk/core/src/openjdk/org/org/omg/CORBA/ULongLongSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/ULongLongSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/ULongSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/ULongSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/UNKNOWN.java
trunk/core/src/openjdk/org/org/omg/CORBA/UNSUPPORTED_POLICY.java
trunk/core/src/openjdk/org/org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java
trunk/core/src/openjdk/org/org/omg/CORBA/UShortSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/UShortSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/UnionMember.java
trunk/core/src/openjdk/org/org/omg/CORBA/UnionMemberHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/UnknownUserException.java
trunk/core/src/openjdk/org/org/omg/CORBA/UnknownUserExceptionHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/UnknownUserExceptionHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/UserException.java
trunk/core/src/openjdk/org/org/omg/CORBA/VM_ABSTRACT.java
trunk/core/src/openjdk/org/org/omg/CORBA/VM_CUSTOM.java
trunk/core/src/openjdk/org/org/omg/CORBA/VM_NONE.java
trunk/core/src/openjdk/org/org/omg/CORBA/VM_TRUNCATABLE.java
trunk/core/src/openjdk/org/org/omg/CORBA/ValueBaseHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/ValueBaseHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/ValueMember.java
trunk/core/src/openjdk/org/org/omg/CORBA/ValueMemberHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/VersionSpecHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/VisibilityHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/WCharSeqHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/WCharSeqHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/WStringValueHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/WrongTransaction.java
trunk/core/src/openjdk/org/org/omg/CORBA/WrongTransactionHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/WrongTransactionHolder.java
trunk/core/src/openjdk/org/org/omg/CORBA/_IDLTypeStub.java
trunk/core/src/openjdk/org/org/omg/CORBA/_PolicyStub.java
trunk/core/src/openjdk/org/org/omg/CORBA/doc-files/
trunk/core/src/openjdk/org/org/omg/CORBA/doc-files/compliance.html
trunk/core/src/openjdk/org/org/omg/CORBA/doc-files/generatedfiles.html
trunk/core/src/openjdk/org/org/omg/CORBA/ir.idl
trunk/core/src/openjdk/org/org/omg/CORBA/orb.idl
trunk/core/src/openjdk/org/org/omg/CORBA/package.html
trunk/core/src/openjdk/org/org/omg/CORBA/portable/
trunk/core/src/openjdk/org/org/omg/CORBA/portable/ApplicationException.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/BoxedValueHelper.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/CustomValue.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/Delegate.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/IDLEntity.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/IndirectionException.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/InputStream.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/InvokeHandler.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/ObjectImpl.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/OutputStream.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/RemarshalException.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/ResponseHandler.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/ServantObject.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/Streamable.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/StreamableValue.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/UnknownException.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/ValueBase.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/ValueFactory.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/ValueInputStream.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/ValueOutputStream.java
trunk/core/src/openjdk/org/org/omg/CORBA/portable/package.html
trunk/core/src/openjdk/org/org/omg/CORBA_2_3/
trunk/core/src/openjdk/org/org/omg/CORBA_2_3/ORB.java
trunk/core/src/openjdk/org/org/omg/CORBA_2_3/package.html
trunk/core/src/openjdk/org/org/omg/CORBA_2_3/portable/
trunk/core/src/openjdk/org/org/omg/CORBA_2_3/portable/Delegate.java
trunk/core/src/openjdk/org/org/omg/CORBA_2_3/portable/InputStream.java
trunk/core/src/openjdk/org/org/omg/CORBA_2_3/portable/ObjectImpl.java
trunk/core/src/openjdk/org/org/omg/CORBA_2_3/portable/OutputStream.java
trunk/core/src/openjdk/org/org/omg/CORBA_2_3/portable/package.html
trunk/core/src/openjdk/org/org/omg/CosNaming/
trunk/core/src/openjdk/org/org/omg/CosNaming/NamingContextExtPackage/
trunk/core/src/openjdk/org/org/omg/CosNaming/NamingContextExtPackage/package.html
trunk/core/src/openjdk/org/org/omg/CosNaming/NamingContextPackage/
trunk/core/src/openjdk/org/org/omg/CosNaming/NamingContextPackage/package.html
trunk/core/src/openjdk/org/org/omg/CosNaming/_BindingIteratorImplBase.java
trunk/core/src/openjdk/org/org/omg/CosNaming/_NamingContextImplBase.java
trunk/core/src/openjdk/org/org/omg/CosNaming/nameservice.idl
trunk/core/src/openjdk/org/org/omg/CosNaming/package.html
trunk/core/src/openjdk/org/org/omg/Dynamic/
trunk/core/src/openjdk/org/org/omg/Dynamic/package.html
trunk/core/src/openjdk/org/org/omg/DynamicAny/
trunk/core/src/openjdk/org/org/omg/DynamicAny/DynAnyFactoryPackage/
trunk/core/src/openjdk/org/org/omg/DynamicAny/DynAnyFactoryPackage/package.html
trunk/core/src/openjdk/org/org/omg/DynamicAny/DynAnyPackage/
trunk/core/src/openjdk/org/org/omg/DynamicAny/DynAnyPackage/package.html
trunk/core/src/openjdk/org/org/omg/DynamicAny/DynamicAny.idl
trunk/core/src/openjdk/org/org/omg/DynamicAny/package.html
trunk/core/src/openjdk/org/org/omg/IOP/
trunk/core/src/openjdk/org/org/omg/IOP/CodecFactoryPackage/
trunk/core/src/openjdk/org/org/omg/IOP/CodecFactoryPackage/package.html
trunk/core/src/openjdk/org/org/omg/IOP/CodecPackage/
trunk/core/src/openjdk/org/org/omg/IOP/CodecPackage/package.html
trunk/core/src/openjdk/org/org/omg/IOP/package.html
trunk/core/src/openjdk/org/org/omg/Messaging/
trunk/core/src/openjdk/org/org/omg/Messaging/package.html
trunk/core/src/openjdk/org/org/omg/PortableInterceptor/
trunk/core/src/openjdk/org/org/omg/PortableInterceptor/CORBAX.idl
trunk/core/src/openjdk/org/org/omg/PortableInterceptor/IOP.idl
trunk/core/src/openjdk/org/org/omg/PortableInterceptor/Interceptors.idl
trunk/core/src/openjdk/org/org/omg/PortableInterceptor/Messaging.idl
trunk/core/src/openjdk/org/org/omg/PortableInterceptor/ORBInitInfoPackage/
trunk/core/src/openjdk/org/org/omg/PortableInterceptor/ORBInitInfoPackage/package.html
trunk/core/src/openjdk/org/org/omg/PortableInterceptor/package.html
trunk/core/src/openjdk/org/org/omg/PortableServer/
trunk/core/src/openjdk/org/org/omg/PortableServer/CurrentHelper.java
trunk/core/src/openjdk/org/org/omg/PortableServer/CurrentPackage/
trunk/core/src/openjdk/org/org/omg/PortableServer/CurrentPackage/package.html
trunk/core/src/openjdk/org/org/omg/PortableServer/DynamicImplementation.java
trunk/core/src/openjdk/org/org/omg/PortableServer/POAHelper.java
trunk/core/src/openjdk/org/org/omg/PortableServer/POAManagerPackage/
trunk/core/src/openjdk/org/org/omg/PortableServer/POAManagerPackage/package.html
trunk/core/src/openjdk/org/org/omg/PortableServer/POAPackage/
trunk/core/src/openjdk/org/org/omg/PortableServer/POAPackage/package.html
trunk/core/src/openjdk/org/org/omg/PortableServer/Servant.java
trunk/core/src/openjdk/org/org/omg/PortableServer/ServantLocatorPackage/
trunk/core/src/openjdk/org/org/omg/PortableServer/ServantLocatorPackage/CookieHolder.java
trunk/core/src/openjdk/org/org/omg/PortableServer/ServantLocatorPackage/package.html
trunk/core/src/openjdk/org/org/omg/PortableServer/corba.idl
trunk/core/src/openjdk/org/org/omg/PortableServer/package.html
trunk/core/src/openjdk/org/org/omg/PortableServer/poa.idl
trunk/core/src/openjdk/org/org/omg/PortableServer/portable/
trunk/core/src/openjdk/org/org/omg/PortableServer/portable/Delegate.java
trunk/core/src/openjdk/org/org/omg/PortableServer/portable/package.html
trunk/core/src/openjdk/org/org/omg/SendingContext/
trunk/core/src/openjdk/org/org/omg/SendingContext/RunTime.java
trunk/core/src/openjdk/org/org/omg/SendingContext/RunTimeOperations.java
trunk/core/src/openjdk/org/org/omg/SendingContext/package.html
trunk/core/src/openjdk/org/org/omg/stub/
trunk/core/src/openjdk/org/org/omg/stub/java/
trunk/core/src/openjdk/org/org/omg/stub/java/rmi/
trunk/core/src/openjdk/org/org/omg/stub/java/rmi/_Remote_Stub.java
trunk/core/src/openjdk/org/org/omg/stub/java/rmi/package.html
trunk/core/src/openjdk/org/org/relaxng/
trunk/core/src/openjdk/org/org/relaxng/datatype/
trunk/core/src/openjdk/org/org/relaxng/datatype/Datatype.java
trunk/core/src/openjdk/org/org/relaxng/datatype/DatatypeBuilder.java
trunk/core/src/openjdk/org/org/relaxng/datatype/DatatypeException.java
trunk/core/src/openjdk/org/org/relaxng/datatype/DatatypeLibrary.java
trunk/core/src/openjdk/org/org/relaxng/datatype/DatatypeLibraryFactory.java
trunk/core/src/openjdk/org/org/relaxng/datatype/DatatypeStreamingValidator.java
trunk/core/src/openjdk/org/org/relaxng/datatype/ValidationContext.java
trunk/core/src/openjdk/org/org/relaxng/datatype/helpers/
trunk/core/src/openjdk/org/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java
trunk/core/src/openjdk/org/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java
trunk/core/src/openjdk/org/org/relaxng/datatype/helpers/StreamingValidatorImpl.java
trunk/core/src/openjdk/org/org/w3c/
trunk/core/src/openjdk/org/org/w3c/dom/
trunk/core/src/openjdk/org/org/w3c/dom/Attr.java
trunk/core/src/openjdk/org/org/w3c/dom/CDATASection.java
trunk/core/src/openjdk/org/org/w3c/dom/CharacterData.java
trunk/core/src/openjdk/org/org/w3c/dom/Comment.java
trunk/core/src/openjdk/org/org/w3c/dom/DOMConfiguration.java
trunk/core/src/openjdk/org/org/w3c/dom/DOMError.java
trunk/core/src/openjdk/org/org/w3c/dom/DOMErrorHandler.java
trunk/core/src/openjdk/org/org/w3c/dom/DOMException.java
trunk/core/src/openjdk/org/org/w3c/dom/DOMImplementation.java
trunk/core/src/openjdk/org/org/w3c/dom/DOMImplementationList.java
trunk/core/src/openjdk/org/org/w3c/dom/DOMImplementationSource.java
trunk/core/src/openjdk/org/org/w3c/dom/DOMLocator.java
trunk/core/src/openjdk/org/org/w3c/dom/DOMStringList.java
trunk/core/src/openjdk/org/org/w3c/dom/Document.java
trunk/core/src/openjdk/org/org/w3c/dom/DocumentFragment.java
trunk/core/src/openjdk/org/org/w3c/dom/DocumentType.java
trunk/core/src/openjdk/org/org/w3c/dom/Element.java
trunk/core/src/openjdk/org/org/w3c/dom/Entity.java
trunk/core/src/openjdk/org/org/w3c/dom/EntityReference.java
trunk/core/src/openjdk/org/org/w3c/dom/NameList.java
trunk/core/src/openjdk/org/org/w3c/dom/NamedNodeMap.java
trunk/core/src/openjdk/org/org/w3c/dom/Node.java
trunk/core/src/openjdk/org/org/w3c/dom/NodeList.java
trunk/core/src/openjdk/org/org/w3c/dom/Notation.java
trunk/core/src/openjdk/org/org/w3c/dom/ProcessingInstruction.java
trunk/core/src/openjdk/org/org/w3c/dom/Text.java
trunk/core/src/openjdk/org/org/w3c/dom/TypeInfo.java
trunk/core/src/openjdk/org/org/w3c/dom/UserDataHandler.java
trunk/core/src/openjdk/org/org/w3c/dom/bootstrap/
trunk/core/src/openjdk/org/org/w3c/dom/bootstrap/DOMImplementationRegistry.java
trunk/core/src/openjdk/org/org/w3c/dom/css/
trunk/core/src/openjdk/org/org/w3c/dom/css/CSS2Properties.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSCharsetRule.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSFontFaceRule.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSImportRule.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSMediaRule.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSPageRule.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSPrimitiveValue.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSRule.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSRuleList.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSStyleDeclaration.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSStyleRule.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSStyleSheet.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSUnknownRule.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSValue.java
trunk/core/src/openjdk/org/org/w3c/dom/css/CSSValueList.java
trunk/core/src/openjdk/org/org/w3c/dom/css/Counter.java
trunk/core/src/openjdk/org/org/w3c/dom/css/DOMImplementationCSS.java
trunk/core/src/openjdk/org/org/w3c/dom/css/DocumentCSS.java
trunk/core/src/openjdk/org/org/w3c/dom/css/ElementCSSInlineStyle.java
trunk/core/src/openjdk/org/org/w3c/dom/css/RGBColor.java
trunk/core/src/openjdk/org/org/w3c/dom/css/Rect.java
trunk/core/src/openjdk/org/org/w3c/dom/css/ViewCSS.java
trunk/core/src/openjdk/org/org/w3c/dom/events/
trunk/core/src/openjdk/org/org/w3c/dom/events/DocumentEvent.java
trunk/core/src/openjdk/org/org/w3c/dom/events/Event.java
trunk/core/src/openjdk/org/org/w3c/dom/events/EventException.java
trunk/core/src/openjdk/org/org/w3c/dom/events/EventListener.java
trunk/core/src/openjdk/org/org/w3c/dom/events/EventTarget.java
trunk/core/src/openjdk/org/org/w3c/dom/events/MouseEvent.java
trunk/core/src/openjdk/org/org/w3c/dom/events/MutationEvent.java
trunk/core/src/openjdk/org/org/w3c/dom/events/UIEvent.java
trunk/core/src/openjdk/org/org/w3c/dom/html/
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLAnchorElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLAppletElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLAreaElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLBRElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLBaseElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLBaseFontElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLBodyElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLButtonElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLCollection.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLDListElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLDOMImplementation.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLDirectoryElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLDivElement.java
trunk/core/src/openjdk/org/org/w3c/dom/html/HTMLDocument.java
trunk...
[truncated message content] |
|
From: <ls...@us...> - 2007-07-07 12:46:21
|
Revision: 3355
http://jnode.svn.sourceforge.net/jnode/?rev=3355&view=rev
Author: lsantha
Date: 2007-07-07 05:46:16 -0700 (Sat, 07 Jul 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/com/com/sun/java/
trunk/core/src/openjdk/com/com/sun/java/swing/
trunk/core/src/openjdk/com/com/sun/java/swing/plaf/
trunk/core/src/openjdk/com/com/sun/java/swing/plaf/windows/
trunk/core/src/openjdk/com/com/sun/java/swing/plaf/windows/DesktopProperty.java
trunk/core/src/openjdk/com/com/sun/swing/
trunk/core/src/openjdk/com/com/sun/swing/internal/
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/basic.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/basic_de.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/basic_es.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/basic_it.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/metal.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/metal_de.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/metal_es.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/metal_fr.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/metal_it.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/metal_ja.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/metal_ko.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/metal_zh_CN.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/metal/resources/metal_zh_TW.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/synth.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/synth_de.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/synth_es.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/synth_fr.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/synth_it.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/synth_ja.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/synth_ko.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/synth_sv.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/synth_zh_CN.properties
trunk/core/src/openjdk/com/com/sun/swing/internal/plaf/synth/resources/synth_zh_TW.properties
trunk/core/src/openjdk/java/java/awt/
trunk/core/src/openjdk/java/java/awt/Desktop.java
trunk/core/src/openjdk/java/java/awt/GradientPaintContext.java
trunk/core/src/openjdk/java/java/awt/LinearGradientPaint.java
trunk/core/src/openjdk/java/java/awt/LinearGradientPaintContext.java
trunk/core/src/openjdk/java/java/awt/MultipleGradientPaint.java
trunk/core/src/openjdk/java/java/awt/MultipleGradientPaintContext.java
trunk/core/src/openjdk/java/java/awt/RadialGradientPaint.java
trunk/core/src/openjdk/java/java/awt/RadialGradientPaintContext.java
trunk/core/src/openjdk/java/java/awt/RenderingHints.java
trunk/core/src/openjdk/java/java/awt/SystemTray.java
trunk/core/src/openjdk/java/java/awt/TrayIcon.java
trunk/core/src/openjdk/java/java/awt/font/
trunk/core/src/openjdk/java/java/awt/font/FontRenderContext.java
trunk/core/src/openjdk/java/java/awt/font/LayoutPath.java
trunk/core/src/openjdk/java/java/awt/geom/
trunk/core/src/openjdk/java/java/awt/geom/Path2D.java
trunk/core/src/openjdk/java/java/awt/peer/
trunk/core/src/openjdk/java/java/awt/peer/DesktopPeer.java
trunk/core/src/openjdk/java/java/awt/peer/KeyboardFocusManagerPeer.java
trunk/core/src/openjdk/java/java/awt/peer/SystemTrayPeer.java
trunk/core/src/openjdk/java/java/awt/peer/TrayIconPeer.java
trunk/core/src/openjdk/javax/javax/swing/
trunk/core/src/openjdk/javax/javax/swing/DefaultRowSorter.java
trunk/core/src/openjdk/javax/javax/swing/DropMode.java
trunk/core/src/openjdk/javax/javax/swing/LayoutStyle.java
trunk/core/src/openjdk/javax/javax/swing/RowFilter.java
trunk/core/src/openjdk/javax/javax/swing/RowSorter.java
trunk/core/src/openjdk/javax/javax/swing/SortOrder.java
trunk/core/src/openjdk/javax/javax/swing/event/
trunk/core/src/openjdk/javax/javax/swing/event/RowSorterEvent.java
trunk/core/src/openjdk/javax/javax/swing/event/RowSorterListener.java
trunk/core/src/openjdk/javax/javax/swing/plaf.zip
trunk/core/src/openjdk/javax/javax/swing/table/
trunk/core/src/openjdk/javax/javax/swing/table/TableRowSorter.java
trunk/core/src/openjdk/javax/javax/swing/table/TableStringConverter.java
trunk/core/src/openjdk/sun/sun/awt/AWTAutoShutdown.java
trunk/core/src/openjdk/sun/sun/awt/AWTSecurityManager.java
trunk/core/src/openjdk/sun/sun/awt/AppContext.java
trunk/core/src/openjdk/sun/sun/awt/ComponentAccessor.java
trunk/core/src/openjdk/sun/sun/awt/ComponentFactory.java
trunk/core/src/openjdk/sun/sun/awt/ConstrainableGraphics.java
trunk/core/src/openjdk/sun/sun/awt/DefaultMouseInfoPeer.java
trunk/core/src/openjdk/sun/sun/awt/DesktopBrowse.java
trunk/core/src/openjdk/sun/sun/awt/DisplayChangedListener.java
trunk/core/src/openjdk/sun/sun/awt/FontConfiguration.java
trunk/core/src/openjdk/sun/sun/awt/FontDescriptor.java
trunk/core/src/openjdk/sun/sun/awt/GlobalCursorManager.java
trunk/core/src/openjdk/sun/sun/awt/HeadlessToolkit.java
trunk/core/src/openjdk/sun/sun/awt/InputMethodSupport.java
trunk/core/src/openjdk/sun/sun/awt/KeyboardFocusManagerPeerImpl.java
trunk/core/src/openjdk/sun/sun/awt/ModalityEvent.java
trunk/core/src/openjdk/sun/sun/awt/ModalityListener.java
trunk/core/src/openjdk/sun/sun/awt/NativeLibLoader.java
trunk/core/src/openjdk/sun/sun/awt/PeerEvent.java
trunk/core/src/openjdk/sun/sun/awt/SunDisplayChanger.java
trunk/core/src/openjdk/sun/sun/awt/SunHints.java
trunk/core/src/openjdk/sun/sun/awt/SunToolkit.java
trunk/core/src/openjdk/sun/sun/awt/UngrabEvent.java
trunk/core/src/openjdk/sun/sun/awt/WindowClosingListener.java
trunk/core/src/openjdk/sun/sun/awt/WindowClosingSupport.java
trunk/core/src/openjdk/sun/sun/awt/datatransfer/
trunk/core/src/openjdk/sun/sun/awt/datatransfer/ClipboardTransferable.java
trunk/core/src/openjdk/sun/sun/awt/datatransfer/DataTransferer.java
trunk/core/src/openjdk/sun/sun/awt/datatransfer/SunClipboard.java
trunk/core/src/openjdk/sun/sun/awt/datatransfer/ToolkitThreadBlockedHandler.java
trunk/core/src/openjdk/sun/sun/awt/datatransfer/TransferableProxy.java
trunk/core/src/openjdk/sun/sun/awt/dnd/
trunk/core/src/openjdk/sun/sun/awt/dnd/SunDragSourceContextPeer.java
trunk/core/src/openjdk/sun/sun/awt/dnd/SunDropTargetContextPeer.java
trunk/core/src/openjdk/sun/sun/awt/dnd/SunDropTargetEvent.java
trunk/core/src/openjdk/sun/sun/awt/geom/
trunk/core/src/openjdk/sun/sun/awt/geom/AreaOp.java
trunk/core/src/openjdk/sun/sun/awt/geom/ChainEnd.java
trunk/core/src/openjdk/sun/sun/awt/geom/Crossings.java
trunk/core/src/openjdk/sun/sun/awt/geom/Curve.java
trunk/core/src/openjdk/sun/sun/awt/geom/CurveLink.java
trunk/core/src/openjdk/sun/sun/awt/geom/Edge.java
trunk/core/src/openjdk/sun/sun/awt/geom/Order0.java
trunk/core/src/openjdk/sun/sun/awt/geom/Order1.java
trunk/core/src/openjdk/sun/sun/awt/geom/Order2.java
trunk/core/src/openjdk/sun/sun/awt/geom/Order3.java
trunk/core/src/openjdk/sun/sun/awt/im/
trunk/core/src/openjdk/sun/sun/awt/im/CompositionArea.java
trunk/core/src/openjdk/sun/sun/awt/im/CompositionAreaHandler.java
trunk/core/src/openjdk/sun/sun/awt/im/InputContext.java
trunk/core/src/openjdk/sun/sun/awt/im/InputMethodAdapter.java
trunk/core/src/openjdk/sun/sun/awt/im/InputMethodContext.java
trunk/core/src/openjdk/sun/sun/awt/im/InputMethodJFrame.java
trunk/core/src/openjdk/sun/sun/awt/im/InputMethodLocator.java
trunk/core/src/openjdk/sun/sun/awt/im/InputMethodManager.java
trunk/core/src/openjdk/sun/sun/awt/im/InputMethodPopupMenu.java
trunk/core/src/openjdk/sun/sun/awt/im/InputMethodWindow.java
trunk/core/src/openjdk/sun/sun/awt/im/SimpleInputMethodWindow.java
trunk/core/src/openjdk/sun/sun/awt/image/
trunk/core/src/openjdk/sun/sun/awt/image/BadDepthException.java
trunk/core/src/openjdk/sun/sun/awt/image/BufImgSurfaceData.java
trunk/core/src/openjdk/sun/sun/awt/image/BufImgSurfaceManager.java
trunk/core/src/openjdk/sun/sun/awt/image/BufferedImageDevice.java
trunk/core/src/openjdk/sun/sun/awt/image/BufferedImageGraphicsConfig.java
trunk/core/src/openjdk/sun/sun/awt/image/ByteArrayImageSource.java
trunk/core/src/openjdk/sun/sun/awt/image/ByteBandedRaster.java
trunk/core/src/openjdk/sun/sun/awt/image/ByteComponentRaster.java
trunk/core/src/openjdk/sun/sun/awt/image/ByteInterleavedRaster.java
trunk/core/src/openjdk/sun/sun/awt/image/BytePackedRaster.java
trunk/core/src/openjdk/sun/sun/awt/image/DataBufferNative.java
trunk/core/src/openjdk/sun/sun/awt/image/FileImageSource.java
trunk/core/src/openjdk/sun/sun/awt/image/GifImageDecoder.java
trunk/core/src/openjdk/sun/sun/awt/image/ImageAccessException.java
trunk/core/src/openjdk/sun/sun/awt/image/ImageConsumerQueue.java
trunk/core/src/openjdk/sun/sun/awt/image/ImageDecoder.java
trunk/core/src/openjdk/sun/sun/awt/image/ImageFetchable.java
trunk/core/src/openjdk/sun/sun/awt/image/ImageFetcher.java
trunk/core/src/openjdk/sun/sun/awt/image/ImageFormatException.java
trunk/core/src/openjdk/sun/sun/awt/image/ImageRepresentation.java
trunk/core/src/openjdk/sun/sun/awt/image/ImageWatched.java
trunk/core/src/openjdk/sun/sun/awt/image/ImagingLib.java
trunk/core/src/openjdk/sun/sun/awt/image/InputStreamImageSource.java
trunk/core/src/openjdk/sun/sun/awt/image/IntegerComponentRaster.java
trunk/core/src/openjdk/sun/sun/awt/image/IntegerInterleavedRaster.java
trunk/core/src/openjdk/sun/sun/awt/image/JPEGImageDecoder.java
trunk/core/src/openjdk/sun/sun/awt/image/NativeLibLoader.java
trunk/core/src/openjdk/sun/sun/awt/image/OffScreenImage.java
trunk/core/src/openjdk/sun/sun/awt/image/OffScreenImageSource.java
trunk/core/src/openjdk/sun/sun/awt/image/PNGImageDecoder.java
trunk/core/src/openjdk/sun/sun/awt/image/PixelConverter.java
trunk/core/src/openjdk/sun/sun/awt/image/ShortBandedRaster.java
trunk/core/src/openjdk/sun/sun/awt/image/ShortComponentRaster.java
trunk/core/src/openjdk/sun/sun/awt/image/ShortInterleavedRaster.java
trunk/core/src/openjdk/sun/sun/awt/image/SunWritableRaster.java
trunk/core/src/openjdk/sun/sun/awt/image/SurfaceManager.java
trunk/core/src/openjdk/sun/sun/awt/image/ToolkitImage.java
trunk/core/src/openjdk/sun/sun/awt/image/URLImageSource.java
trunk/core/src/openjdk/sun/sun/awt/image/WritableRasterNative.java
trunk/core/src/openjdk/sun/sun/awt/image/XbmImageDecoder.java
trunk/core/src/openjdk/sun/sun/awt/shell/
trunk/core/src/openjdk/sun/sun/awt/shell/DefaultShellFolder.java
trunk/core/src/openjdk/sun/sun/awt/shell/ShellFolder.java
trunk/core/src/openjdk/sun/sun/awt/shell/ShellFolderColumnInfo.java
trunk/core/src/openjdk/sun/sun/awt/shell/ShellFolderManager.java
trunk/core/src/openjdk/sun/sun/font/
trunk/core/src/openjdk/sun/sun/font/AttributeMap.java
trunk/core/src/openjdk/sun/sun/font/AttributeValues.java
trunk/core/src/openjdk/sun/sun/font/BidiUtils.java
trunk/core/src/openjdk/sun/sun/font/CMap.java
trunk/core/src/openjdk/sun/sun/font/CharToGlyphMapper.java
trunk/core/src/openjdk/sun/sun/font/CompositeFont.java
trunk/core/src/openjdk/sun/sun/font/CompositeFontDescriptor.java
trunk/core/src/openjdk/sun/sun/font/CompositeGlyphMapper.java
trunk/core/src/openjdk/sun/sun/font/CompositeStrike.java
trunk/core/src/openjdk/sun/sun/font/CoreMetrics.java
trunk/core/src/openjdk/sun/sun/font/Decoration.java
trunk/core/src/openjdk/sun/sun/font/DelegatingShape.java
trunk/core/src/openjdk/sun/sun/font/EAttribute.java
trunk/core/src/openjdk/sun/sun/font/ExtendedTextLabel.java
trunk/core/src/openjdk/sun/sun/font/ExtendedTextSourceLabel.java
trunk/core/src/openjdk/sun/sun/font/FileFont.java
trunk/core/src/openjdk/sun/sun/font/FileFontStrike.java
trunk/core/src/openjdk/sun/sun/font/Font2D.java
trunk/core/src/openjdk/sun/sun/font/Font2DHandle.java
trunk/core/src/openjdk/sun/sun/font/FontDesignMetrics.java
trunk/core/src/openjdk/sun/sun/font/FontFamily.java
trunk/core/src/openjdk/sun/sun/font/FontLineMetrics.java
trunk/core/src/openjdk/sun/sun/font/FontManager.java
trunk/core/src/openjdk/sun/sun/font/FontResolver.java
trunk/core/src/openjdk/sun/sun/font/FontRunIterator.java
trunk/core/src/openjdk/sun/sun/font/FontStrike.java
trunk/core/src/openjdk/sun/sun/font/FontStrikeDesc.java
trunk/core/src/openjdk/sun/sun/font/FontStrikeDisposer.java
trunk/core/src/openjdk/sun/sun/font/GlyphLayout.java
trunk/core/src/openjdk/sun/sun/font/GlyphList.java
trunk/core/src/openjdk/sun/sun/font/GraphicComponent.java
trunk/core/src/openjdk/sun/sun/font/LayoutPathImpl.java
trunk/core/src/openjdk/sun/sun/font/NativeFont.java
trunk/core/src/openjdk/sun/sun/font/NativeGlyphMapper.java
trunk/core/src/openjdk/sun/sun/font/NativeStrike.java
trunk/core/src/openjdk/sun/sun/font/NativeStrikeDisposer.java
trunk/core/src/openjdk/sun/sun/font/PhysicalFont.java
trunk/core/src/openjdk/sun/sun/font/PhysicalStrike.java
trunk/core/src/openjdk/sun/sun/font/Script.java
trunk/core/src/openjdk/sun/sun/font/ScriptRun.java
trunk/core/src/openjdk/sun/sun/font/ScriptRunData.java
trunk/core/src/openjdk/sun/sun/font/StandardGlyphVector.java
trunk/core/src/openjdk/sun/sun/font/StandardTextSource.java
trunk/core/src/openjdk/sun/sun/font/StrikeCache.java
trunk/core/src/openjdk/sun/sun/font/StrikeMetrics.java
trunk/core/src/openjdk/sun/sun/font/SunLayoutEngine.java
trunk/core/src/openjdk/sun/sun/font/TextLabel.java
trunk/core/src/openjdk/sun/sun/font/TextLabelFactory.java
trunk/core/src/openjdk/sun/sun/font/TextLineComponent.java
trunk/core/src/openjdk/sun/sun/font/TextRecord.java
trunk/core/src/openjdk/sun/sun/font/TextSource.java
trunk/core/src/openjdk/sun/sun/font/TextSourceLabel.java
trunk/core/src/openjdk/sun/sun/font/TrueTypeFont.java
trunk/core/src/openjdk/sun/sun/font/TrueTypeGlyphMapper.java
trunk/core/src/openjdk/sun/sun/font/Type1Font.java
trunk/core/src/openjdk/sun/sun/font/Type1GlyphMapper.java
trunk/core/src/openjdk/sun/sun/font/Underline.java
trunk/core/src/openjdk/sun/sun/font/XMap.java
trunk/core/src/openjdk/sun/sun/java2d/
trunk/core/src/openjdk/sun/sun/java2d/DefaultDisposerRecord.java
trunk/core/src/openjdk/sun/sun/java2d/Disposer.java
trunk/core/src/openjdk/sun/sun/java2d/DisposerRecord.java
trunk/core/src/openjdk/sun/sun/java2d/DisposerTarget.java
trunk/core/src/openjdk/sun/sun/java2d/FontSupport.java
trunk/core/src/openjdk/sun/sun/java2d/HeadlessGraphicsEnvironment.java
trunk/core/src/openjdk/sun/sun/java2d/InvalidPipeException.java
trunk/core/src/openjdk/sun/sun/java2d/NullSurfaceData.java
trunk/core/src/openjdk/sun/sun/java2d/StateTrackable.java
trunk/core/src/openjdk/sun/sun/java2d/StateTrackableDelegate.java
trunk/core/src/openjdk/sun/sun/java2d/StateTracker.java
trunk/core/src/openjdk/sun/sun/java2d/SunCompositeContext.java
trunk/core/src/openjdk/sun/sun/java2d/SunGraphics2D.java
trunk/core/src/openjdk/sun/sun/java2d/SunGraphicsEnvironment.java
trunk/core/src/openjdk/sun/sun/java2d/SurfaceData.java
trunk/core/src/openjdk/sun/sun/java2d/SurfaceDataProxy.java
trunk/core/src/openjdk/sun/sun/java2d/loops/
trunk/core/src/openjdk/sun/sun/java2d/loops/Blit.java
trunk/core/src/openjdk/sun/sun/java2d/loops/BlitBg.java
trunk/core/src/openjdk/sun/sun/java2d/loops/CompositeType.java
trunk/core/src/openjdk/sun/sun/java2d/loops/CustomComponent.java
trunk/core/src/openjdk/sun/sun/java2d/loops/DrawGlyphList.java
trunk/core/src/openjdk/sun/sun/java2d/loops/DrawGlyphListAA.java
trunk/core/src/openjdk/sun/sun/java2d/loops/DrawGlyphListLCD.java
trunk/core/src/openjdk/sun/sun/java2d/loops/DrawLine.java
trunk/core/src/openjdk/sun/sun/java2d/loops/DrawPath.java
trunk/core/src/openjdk/sun/sun/java2d/loops/DrawPolygons.java
trunk/core/src/openjdk/sun/sun/java2d/loops/DrawRect.java
trunk/core/src/openjdk/sun/sun/java2d/loops/FillPath.java
trunk/core/src/openjdk/sun/sun/java2d/loops/FillRect.java
trunk/core/src/openjdk/sun/sun/java2d/loops/FillSpans.java
trunk/core/src/openjdk/sun/sun/java2d/loops/FontInfo.java
trunk/core/src/openjdk/sun/sun/java2d/loops/GeneralRenderer.java
trunk/core/src/openjdk/sun/sun/java2d/loops/GraphicsPrimitive.java
trunk/core/src/openjdk/sun/sun/java2d/loops/GraphicsPrimitiveMgr.java
trunk/core/src/openjdk/sun/sun/java2d/loops/GraphicsPrimitiveProxy.java
trunk/core/src/openjdk/sun/sun/java2d/loops/MaskBlit.java
trunk/core/src/openjdk/sun/sun/java2d/loops/MaskFill.java
trunk/core/src/openjdk/sun/sun/java2d/loops/ProcessPath.java
trunk/core/src/openjdk/sun/sun/java2d/loops/RenderCache.java
trunk/core/src/openjdk/sun/sun/java2d/loops/RenderLoops.java
trunk/core/src/openjdk/sun/sun/java2d/loops/ScaledBlit.java
trunk/core/src/openjdk/sun/sun/java2d/loops/SurfaceType.java
trunk/core/src/openjdk/sun/sun/java2d/loops/TransformBlit.java
trunk/core/src/openjdk/sun/sun/java2d/loops/TransformHelper.java
trunk/core/src/openjdk/sun/sun/java2d/loops/XORComposite.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/
trunk/core/src/openjdk/sun/sun/java2d/pipe/AATextRenderer.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/AlphaColorPipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/AlphaPaintPipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/BufferedOpCodes.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/CompositePipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/DrawImage.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/DrawImagePipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/DuctusRenderer.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/DuctusShapeRenderer.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/GeneralCompositePipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/GlyphListLoopPipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/GlyphListPipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/LCDTextRenderer.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/LoopPipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/NullPipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/OutlineTextRenderer.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/PixelDrawPipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/PixelFillPipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/PixelToShapeConverter.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/Region.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/RegionClipSpanIterator.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/RegionIterator.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/RegionSpanIterator.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/RenderBuffer.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/RenderQueue.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/ShapeDrawPipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/ShapeSpanIterator.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/SolidTextRenderer.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/SpanClipRenderer.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/SpanIterator.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/SpanShapeRenderer.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/TextPipe.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/TextRenderer.java
trunk/core/src/openjdk/sun/sun/java2d/pipe/ValidatePipe.java
trunk/core/src/openjdk/sun/sun/print/
trunk/core/src/openjdk/sun/sun/print/ProxyGraphics.java
trunk/core/src/openjdk/sun/sun/print/ProxyPrintGraphics.java
trunk/core/src/openjdk/sun/sun/swing/
trunk/core/src/openjdk/sun/sun/swing/AccessibleMethod.java
trunk/core/src/openjdk/sun/sun/swing/AccumulativeRunnable.java
trunk/core/src/openjdk/sun/sun/swing/BakedArrayList.java
trunk/core/src/openjdk/sun/sun/swing/CachedPainter.java
trunk/core/src/openjdk/sun/sun/swing/DefaultLayoutStyle.java
trunk/core/src/openjdk/sun/sun/swing/DefaultLookup.java
trunk/core/src/openjdk/sun/sun/swing/FilePane.java
trunk/core/src/openjdk/sun/sun/swing/ImageCache.java
trunk/core/src/openjdk/sun/sun/swing/ImageIconUIResource.java
trunk/core/src/openjdk/sun/sun/swing/MenuItemCheckIconFactory.java
trunk/core/src/openjdk/sun/sun/swing/PrintColorUIResource.java
trunk/core/src/openjdk/sun/sun/swing/PrintingStatus.java
trunk/core/src/openjdk/sun/sun/swing/StringUIClientPropertyKey.java
trunk/core/src/openjdk/sun/sun/swing/SwingLazyValue.java
trunk/core/src/openjdk/sun/sun/swing/SwingUtilities2.java
trunk/core/src/openjdk/sun/sun/swing/UIAction.java
trunk/core/src/openjdk/sun/sun/swing/UIClientPropertyKey.java
trunk/core/src/openjdk/sun/sun/swing/WindowsPlacesBar.java
trunk/core/src/openjdk/sun/sun/swing/icon/
trunk/core/src/openjdk/sun/sun/swing/icon/SortArrowIcon.java
trunk/core/src/openjdk/sun/sun/swing/plaf/
trunk/core/src/openjdk/sun/sun/swing/plaf/synth/
trunk/core/src/openjdk/sun/sun/swing/plaf/synth/DefaultSynthStyle.java
trunk/core/src/openjdk/sun/sun/swing/plaf/synth/Paint9Painter.java
trunk/core/src/openjdk/sun/sun/swing/plaf/synth/StyleAssociation.java
trunk/core/src/openjdk/sun/sun/swing/plaf/synth/SynthFileChooserUI.java
trunk/core/src/openjdk/sun/sun/swing/plaf/synth/SynthFileChooserUIImpl.java
trunk/core/src/openjdk/sun/sun/swing/plaf/synth/SynthIcon.java
trunk/core/src/openjdk/sun/sun/swing/plaf/synth/SynthUI.java
trunk/core/src/openjdk/sun/sun/swing/plaf/windows/
trunk/core/src/openjdk/sun/sun/swing/plaf/windows/ClassicSortArrowIcon.java
trunk/core/src/openjdk/sun/sun/swing/table/
trunk/core/src/openjdk/sun/sun/swing/table/DefaultTableCellHeaderRenderer.java
trunk/core/src/openjdk/sun/sun/swing/text/
trunk/core/src/openjdk/sun/sun/swing/text/CompoundPrintable.java
trunk/core/src/openjdk/sun/sun/swing/text/CountingPrintable.java
trunk/core/src/openjdk/sun/sun/swing/text/TextComponentPrintable.java
trunk/core/src/openjdk/sun/sun/swing/text/html/
trunk/core/src/openjdk/sun/sun/swing/text/html/FrameEditorPaneTag.java
trunk/core/src/openjdk/sun/sun/text/CodePointIterator.java
trunk/core/src/openjdk/vm/sun/awt/
trunk/core/src/openjdk/vm/sun/awt/NativeSunToolkit.java
Added: trunk/core/src/openjdk/com/com/sun/java/swing/plaf/windows/DesktopProperty.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/java/swing/plaf/windows/DesktopProperty.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/java/swing/plaf/windows/DesktopProperty.java 2007-07-07 12:46:16 UTC (rev 3355)
@@ -0,0 +1,305 @@
+/*
+ * Copyright 2001-2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.java.swing.plaf.windows;
+
+import java.awt.*;
+import java.beans.*;
+import java.lang.ref.*;
+import javax.swing.*;
+import javax.swing.plaf.*;
+
+/**
+ * Wrapper for a value from the desktop. The value is lazily looked up, and
+ * can be accessed using the <code>UIManager.ActiveValue</code> method
+ * <code>createValue</code>. If the underlying desktop property changes this
+ * will force the UIs to update all known Frames. You can invoke
+ * <code>invalidate</code> to force the value to be fetched again.
+ *
+ * @version @(#)DesktopProperty.java 1.16 07/05/05
+ */
+// NOTE: Don't rely on this class staying in this location. It is likely
+// to move to a different package in the future.
+public class DesktopProperty implements UIDefaults.ActiveValue {
+ /**
+ * Indicates if an updateUI call is pending.
+ */
+ private static boolean updatePending;
+
+ /**
+ * ReferenceQueue of unreferenced WeakPCLs.
+ */
+ private static ReferenceQueue queue;
+
+
+ /**
+ * PropertyChangeListener attached to the Toolkit.
+ */
+ private WeakPCL pcl;
+ /**
+ * Key used to lookup value from desktop.
+ */
+ private String key;
+ /**
+ * Value to return.
+ */
+ private Object value;
+ /**
+ * Fallback value in case we get null from desktop.
+ */
+ private Object fallback;
+
+ /**
+ * Toolkit.
+ */
+ private Toolkit toolkit;
+
+
+ static {
+ queue = new ReferenceQueue();
+ }
+
+ /**
+ * Cleans up any lingering state held by unrefeernced
+ * DesktopProperties.
+ */
+ static void flushUnreferencedProperties() {
+ WeakPCL pcl;
+
+ while ((pcl = (WeakPCL)queue.poll()) != null) {
+ pcl.dispose();
+ }
+ }
+
+
+ /**
+ * Sets whether or not an updateUI call is pending.
+ */
+ private static synchronized void setUpdatePending(boolean update) {
+ updatePending = update;
+ }
+
+ /**
+ * Returns true if a UI update is pending.
+ */
+ private static synchronized boolean isUpdatePending() {
+ return updatePending;
+ }
+
+ /**
+ * Updates the UIs of all the known Frames.
+ */
+ private static void updateAllUIs() {
+ // Check if the current UI is WindowsLookAndfeel and flush the XP style map.
+ // Note: Change the package test if this class is moved to a different package.
+ Class uiClass = UIManager.getLookAndFeel().getClass();
+ if (uiClass.getPackage().equals(DesktopProperty.class.getPackage())) {
+ //jnode XPStyle.invalidateStyle();
+ }
+ Frame appFrames[] = Frame.getFrames();
+ for (int j=0; j < appFrames.length; j++) {
+ updateWindowUI(appFrames[j]);
+ }
+ }
+
+ /**
+ * Updates the UI of the passed in window and all its children.
+ */
+ private static void updateWindowUI(Window window) {
+ SwingUtilities.updateComponentTreeUI(window);
+ Window ownedWins[] = window.getOwnedWindows();
+ for (int i=0; i < ownedWins.length; i++) {
+ updateWindowUI(ownedWins[i]);
+ }
+ }
+
+
+ /**
+ * Creates a DesktopProperty.
+ *
+ * @param key Key used in looking up desktop value.
+ * @param fallback Value used if desktop property is null.
+ * @param toolkit Toolkit used to fetch property from, can be null
+ * in which default will be used.
+ */
+ public DesktopProperty(String key, Object fallback, Toolkit toolkit) {
+ this.key = key;
+ this.fallback = fallback;
+ this.toolkit = toolkit;
+ // The only sure fire way to clear our references is to create a
+ // Thread and wait for a reference to be added to the queue.
+ // Because it is so rare that you will actually change the look
+ // and feel, this stepped is forgoed and a middle ground of
+ // flushing references from the constructor is instead done.
+ // The implication is that once one DesktopProperty is created
+ // there will most likely be n (number of DesktopProperties created
+ // by the LookAndFeel) WeakPCLs around, but this number will not
+ // grow pas...
[truncated message content] |
|
From: <ls...@us...> - 2007-08-11 19:55:50
|
Revision: 3391
http://jnode.svn.sourceforge.net/jnode/?rev=3391&view=rev
Author: lsantha
Date: 2007-08-11 12:55:49 -0700 (Sat, 11 Aug 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/java/java/util/Collection.java
trunk/core/src/openjdk/java/java/util/Comparator.java
trunk/core/src/openjdk/java/java/util/ConcurrentModificationException.java
trunk/core/src/openjdk/java/java/util/Deque.java
trunk/core/src/openjdk/java/java/util/DuplicateFormatFlagsException.java
trunk/core/src/openjdk/java/java/util/EmptyStackException.java
trunk/core/src/openjdk/java/java/util/Enumeration.java
trunk/core/src/openjdk/java/java/util/Iterator.java
trunk/core/src/openjdk/java/java/util/List.java
trunk/core/src/openjdk/java/java/util/Map.java
trunk/core/src/openjdk/java/java/util/Queue.java
trunk/core/src/openjdk/java/java/util/RandomAccess.java
trunk/core/src/openjdk/java/java/util/Set.java
trunk/core/src/openjdk/java/java/util/SortedMap.java
trunk/core/src/openjdk/java/java/util/SortedSet.java
trunk/core/src/openjdk/java/java/util/package.html
trunk/core/src/openjdk/vm/sun/reflect/NativeConstantPool.java
Added: trunk/core/src/openjdk/java/java/util/Collection.java
===================================================================
--- trunk/core/src/openjdk/java/java/util/Collection.java (rev 0)
+++ trunk/core/src/openjdk/java/java/util/Collection.java 2007-08-11 19:55:49 UTC (rev 3391)
@@ -0,0 +1,441 @@
+/*
+ * Copyright 1997-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.util;
+
+/**
+ * The root interface in the <i>collection hierarchy</i>. A collection
+ * represents a group of objects, known as its <i>elements</i>. Some
+ * collections allow duplicate elements and others do not. Some are ordered
+ * and others unordered. The JDK does not provide any <i>direct</i>
+ * implementations of this interface: it provides implementations of more
+ * specific subinterfaces like <tt>Set</tt> and <tt>List</tt>. This interface
+ * is typically used to pass collections around and manipulate them where
+ * maximum generality is desired.
+ *
+ * <p><i>Bags</i> or <i>multisets</i> (unordered collections that may contain
+ * duplicate elements) should implement this interface directly.
+ *
+ * <p>All general-purpose <tt>Collection</tt> implementation classes (which
+ * typically implement <tt>Collection</tt> indirectly through one of its
+ * subinterfaces) should provide two "standard" constructors: a void (no
+ * arguments) constructor, which creates an empty collection, and a
+ * constructor with a single argument of type <tt>Collection</tt>, which
+ * creates a new collection with the same elements as its argument. In
+ * effect, the latter constructor allows the user to copy any collection,
+ * producing an equivalent collection of the desired implementation type.
+ * There is no way to enforce this convention (as interfaces cannot contain
+ * constructors) but all of the general-purpose <tt>Collection</tt>
+ * implementations in the Java platform libraries comply.
+ *
+ * <p>The "destructive" methods contained in this interface, that is, the
+ * methods that modify the collection on which they operate, are specified to
+ * throw <tt>UnsupportedOperationException</tt> if this collection does not
+ * support the operation. If this is the case, these methods may, but are not
+ * required to, throw an <tt>UnsupportedOperationException</tt> if the
+ * invocation would have no effect on the collection. For example, invoking
+ * the {@link #addAll(Collection)} method on an unmodifiable collection may,
+ * but is not required to, throw the exception if the collection to be added
+ * is empty.
+ *
+ * <p>Some collection implementations have restrictions on the elements that
+ * they may contain. For example, some implementations prohibit null elements,
+ * and some have restrictions on the types of their elements. Attempting to
+ * add an ineligible element throws an unchecked exception, typically
+ * <tt>NullPointerException</tt> or <tt>ClassCastException</tt>. Attempting
+ * to query the presence of an ineligible element may throw an exception,
+ * or it may simply return false; some implementations will exhibit the former
+ * behavior and some will exhibit the latter. More generally, attempting an
+ * operation on an ineligible element whose completion would not result in
+ * the insertion of an ineligible element into the collection may throw an
+ * exception or it may succeed, at the option of the implementation.
+ * Such exceptions are marked as "optional" in the specification for this
+ * interface.
+ *
+ * <p>It is up to each collection to determine its own synchronization
+ * policy. In the absence of a stronger guarantee by the
+ * implementation, undefined behavior may result from the invocation
+ * of any method on a collection that is being mutated by another
+ * thread; this includes direct invocations, passing the collection to
+ * a method that might perform invocations, and using an existing
+ * iterator to examine the collection.
+ *
+ * <p>Many methods in Collections Framework interfaces are defined in
+ * terms of the {@link Object#equals(Object) equals} method. For example,
+ * the specification for the {@link #contains(Object) contains(Object o)}
+ * method says: "returns <tt>true</tt> if and only if this collection
+ * contains at least one element <tt>e</tt> such that
+ * <tt>(o==null ? e==null : o.equals(e))</tt>." This specification should
+ * <i>not</i> be construed to imply that invoking <tt>Collection.contains</tt>
+ * with a non-null argument <tt>o</tt> will cause <tt>o.equals(e)</tt> to be
+ * invoked for any element <tt>e</tt>. Implementations are free to implement
+ * optimizations whereby the <tt>equals</tt> invocation is avoided, for
+ * example, by first comparing the hash codes of the two elements. (The
+ * {@link Object#hashCode()} specification guarantees that two objects with
+ * unequal hash codes cannot be equal.) More generally, implementations of
+ * the various Collections Framework interfaces are free to take advantage of
+ * the specified behavior of underlying {@link Object} methods wherever the
+ * implementor deems it appropriate.
+ *
+ * <p>This interface is a member of the
+ * <a href="{@docRoot}/../technotes/guides/collections/index.html">
+ * Java Collections Framework</a>.
+ *
+ * @author Josh Bloch
+ * @author Neal Gafter
+ * @version 1.61, 05/05/07
+ * @see Set
+ * @see List
+ * @see Map
+ * @see SortedSet
+ * @see SortedMap
+ * @see HashSet
+ * @see TreeSet
+ * @see ArrayList
+ * @see LinkedList
+ * @see Vector
+ * @see Collections
+ * @see Arrays
+ * @see AbstractCollection
+ * @since 1.2
+ */
+
+public interface Collection<E> extends Iterable<E> {
+ // Query Operations
+
+ /**
+ * Returns the number of elements in this collection. If this collection
+ * contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
+ * <tt>Integer.MAX_VALUE</tt>.
+ *
+ * @return the number of elements in this collection
+ */
+ int size();
+
+ /**
+ * Returns <tt>true</tt> if this collection contains no elements.
+ *
+ * @return <tt>true</tt> if this collection contains no elements
+ */
+ boolean isEmpty();
+
+ /**
+ * Returns <tt>true</tt> if this collection contains the specified element.
+ * More formally, returns <tt>true</tt> if and only if this collection
+ * contains at least one element <tt>e</tt> such that
+ * <tt>(o==null ? e==null : o.equals(e))</tt>.
+ *
+ * @param o element whose presence in this collection is to be tested
+ * @return <tt>true</tt> if this collection contains the specified
+ * element
+ * @throws ClassCastException if the type of the specified element
+ * is incompatible with this collection (optional)
+ * @throws NullPointerException if the specified element is null and this
+ * collection does not permit null elements (optional)
+ */
+ boolean contains(Object o);
+
+ /**
+ * Returns an iterator over the elements in this collection. There are no
+ * guarantees concerning the order in which the elements are returned
+ * (unless this collection is an instance of some class that provides a
+ * guarantee).
+ *
+ * @return an <tt>Iterator</tt> over the elements in this collection
+ */
+ Iterator<E> iterator();
+
+ /**
+ * Returns an array containing all of the elements in this collection.
+ * If this collection makes any guarantees as to what order its elements
+ * are returned by its iterator, this method must return the elements in
+ * the same order.
+ *
+ * <p>The returned array will be "safe" in that no references to it are
+ * maintained by this collection. (In other words, this method must
+ * allocate a new array even if this collection is backed by an array).
+ * The caller is thus free to modify the returned array.
+ *
+ * <p>This method acts as bridge between array-based and collection-based
+ * APIs.
+ *
+ * @return an array containing all of the elements in this collection
+ */
+ Object[] toArray();
+
+ /**
+ * Returns an array containing all of the elements in this collection;
+ * the runtime type of the returned array is that of the specified array.
+ * If the collection fits in the specified array, it is returned therein.
+ * Otherwise, a new array is allocated with the runtime type of the
+ * specified array and the size of this collection.
+ *
+ * <p>If this collection fits in the specified array with room to spare
+ * (i.e., the array has more elements than this collection), the element
+ * in the array immediately following the end of the collection is set to
+ * <tt>null</tt>. (This is useful in determining the length of this
+ * collection <i>only</i> if the caller knows that this collection does
+ * not contain any <tt>null</tt> elements.)
+ *
+ * <p>If this collection makes any guarantees as to what order its elements
+ * are returned by its iterator, this method must return the elements in
+ * the same order.
+ *
+ * <p>Like the {@link #toArray()} method, this method acts as bridge between
+ * array-based and collection-based APIs. Further, this method allows
+ * precise control over the runtime type of the output array, and may,
+ * under certain circumstances, be used to save allocation costs.
+ *
+ * <p>Suppose <tt>x</tt> is a collection known to contain only strings.
+ * The following code can be used to dump the collection into a newly
+ * allocated array of <tt>String</tt>:
+ *
+ * <pre>
+ * String[] y = x.toArray(new String[0]);</pre>
+ *
+ * Note that <tt>toArray(new Object[0])</tt> is identical in function to
+ * <tt>toArray()</tt>.
+ *
+ * @param a the array into which the elements of this collection are to be
+ * stored, if it is big enough; otherwise, a new array of the same
+ * runtime type is allocated for this purpose.
+ * @return an array containing all of the elements in this collection
+ * @throws ArrayStoreException if the runtime type of the specified array
+ * is not a supertype of the runtime type of every element in
+ * this collection
+ * @throws NullPointerException if the specified array is null
+ */
+ <T> T[] toArray(T[] a);
+
+ // Modification Operations
+
+ /**
+ * Ensures that this collection contains the specified element (optional
+ * operation). Returns <tt>true</tt> if this collection changed as a
+ * result of the call. (Returns <tt>false</tt> if this collection does
+ * not permit duplicates and already contains the specified element.)<p>
+ *
+ * Collections that support this operation may place limitations on what
+ * elements may be added to this collection. In particular, some
+ * collections will refuse to add <tt>null</tt> elements, and others will
+ * impose restrictions on the type of elements that may be added.
+ * Collection classes should clearly specify in their documentation any
+ * restrictions on what elements may be added.<p>
+ *
+ * If a collection refuses to add a particular element for any reason
+ * other than that it already contains the element, it <i>must</i> throw
+ * an exception (rather than returning <tt>false</tt>). This preserves
+ * the invariant that a collection always contains the specified element
+ * after this call returns.
+ *
+ * @param e element whose presence in this collection is to be ensured
+ * @return <tt>true</tt> if this collection changed as a result of the
+ * call
+ * @throws UnsupportedOperationException if the <tt>add</tt> operation
+ * is not supported by this collection
+ * @throws ClassCastException if the class of the specified element
+ * prevents it from being added to this collection
+ * @throws NullPointerException if the specified element is null and this
+ * collection does not permit null elements
+ * @throws IllegalArgumentException if some property of the element
+ * prevents it from being added to this collection
+ * @throws IllegalStateException if the element cannot be added at this
+ * time due to insertion restrictions
+ */
+ boolean add(E e);
+
+ /**
+ * Removes a single instance of the specified element from this
+ * collection, if it is present (optional operation). More formally,
+ * removes an element <tt>e</tt> such that
+ * <tt>(o==null ? e==null : o.equals(e))</tt>, if
+ * this collection contains one or more such elements. Returns
+ * <tt>true</tt> if this collection contained the specified element (or
+ * equivalently, if this collection changed as a result of the call).
+ *
+ * @param o element to be removed from this collection, if present
+ * @return <tt>true</tt> if an element was removed as a result of this call
+ * @throws ClassCastException if the type of the specified element
+ * is incompatible with this collection (optional)
+ * @throws NullPointerException if the specified element is null and this
+ * collection does not permit null elements (optional)
+ * @throws UnsupportedOperationException if the <tt>remove</tt> operation
+ * is not supported by this collection
+ */
+ boolean remove(Object o);
+
+
+ // Bulk Operations
+
+ /**
+ * Returns <tt>true</tt> if this collection contains all of the elements
+ * in the specified collection.
+ *
+ * @param c collection to be checked for containment in this collection
+ * @return <tt>true</tt> if this collection contains all of the elements
+ * in the specified collection
+ * @throws ClassCastException if the types of one or more elements
+ * in the specified collection are incompatible with this
+ * collection (optional)
+ * @throws NullPointerException if the specified collection contains one
+ * or more null elements and this collection does not permit null
+ * elements (optional), or if the specified collection is null
+ * @see #contains(Object)
+ */
+ boolean containsAll(Collection<?> c);
+
+ /**
+ * Adds all of the elements in the specified collection to this collection
+ * (optional operation). The behavior of this operation is undefined if
+ * the specified collection is modified while the operation is in progress.
+ * (This implies that the behavior of this call is undefined if the
+ * specified collection is this collection, and this collection is
+ * nonempty.)
+ *
+ * @param c collection containing elements to be added to this collection
+ * @return <tt>true</tt> if this collection changed as a result of the call
+ * @throws UnsupportedOperationException if the <tt>addAll</tt> operation
+ * is not supported by this collection
+ * @throws ClassCastException if the class of an element of the specified
+ * collection prevents it from being added to this collection
+ * @throws NullPointerException if the specified collection contains a
+ * null element and this collection does not permit null elements,
+ * or if the specified collection is null
+ * @throws IllegalArgumentException if some property of an element of the
+ * specified collection prevents it from being added to this
+ * collection
+ * @throws IllegalStateException if not all the elements can be added at
+ * this time due to insertion restrictions
+ * @see #add(Object)
+ */
+ boolean addAll(Collection<? extends E> c);
+
+ /**
+ * Removes all of this collection's elements that are also contained in the
+ * specified collection (optional operation). After this call returns,
+ * this collection will contain no elements in common with the specified
+ * collection.
+ *
+ * @param c collection containing elements to be removed from this collection
+ * @return <tt>true</tt> if this collection changed as a result of the
+ * call
+ * @throws UnsupportedOperationException if the <tt>removeAll</tt> method
+ * is not supported by this collection
+ * @throws ClassCastException if the types of one or more elements
+ * in this collection are incompatible with the specified
+ * collection (optional)
+ * @throws NullPointerException if this collection contains one or more
+ * null elements and the specified collection does not support
+ * null elements (optional), or if the specified collection is null
+ * @see #remove(Object)
+ * @see #contains(Object)
+ */
+ boolean removeAll(Collection<?> c);
+
+ /**
+ * Retains only the elements in this collection that are contained in the
+ * specified collection (optional operation). In other words, removes from
+ * this collection all of its elements that are not contained in the
+ * specified collection.
+ *
+ * @param c collection containing elements to be retained in this collection
+ * @return <tt>true</tt> if this collection changed as a result of the call
+ * @throws UnsupportedOperationException if the <tt>retainAll</tt> operation
+ * is not supported by this collection
+ * @throws ClassCastException if the types of one or more elements
+ * in this collection are incompatible with the specified
+ * collection (optional)
+ * @throws NullPointerException if this collection contains one or more
+ * null elements and the specified collection does not permit null
+ * elements (optional), or if the specified collection is null
+ * @see #remove(Object)
+ * @see #contains(Object)
+ */
+ boolean retainAll(Collection<?> c);
+
+ /**
+ * Removes all of the elements from this collection (optional operation).
+ * The collection will be empty after this method returns.
+ *
+ * @throws UnsupportedOperationException if the <tt>clear</tt> operation
+ * is not supported by this collection
+ */
+ void clear();
+
+
+ // Comparison and hashing
+
+ /**
+ * Compares the specified object with this collection for equality. <p>
+ *
+ * While the <tt>Collection</tt> interface adds no stipulations to the
+ * general contract for the <tt>Object.equals</tt>, programmers who
+ * implement the <tt>Collection</tt> interface "directly" (in other words,
+ * create a class that is a <tt>Collection</tt> but is not a <tt>Set</tt>
+ * or a <tt>List</tt>) must exercise care if they choose to override the
+ * <tt>Object.equals</tt>. It is not necessary to do so, and the simplest
+ * course of action is to rely on <tt>Object</tt>'s implementation, but
+ * the implementor may wish to implement a "value comparison" in place of
+ * the default "reference comparison." (The <tt>List</tt> and
+ * <tt>Set</tt> interfaces mandate such value comparisons.)<p>
+ *
+ * The general contract for the <tt>Object.equals</tt> method states that
+ * equals must be symmetric (in other words, <tt>a.equals(b)</tt> if and
+ * only if <tt>b.equals(a)</tt>). The contracts for <tt>List.equals</tt>
+ * and <tt>Set.equals</tt> state that lists are only equal to other lists,
+ * and sets to other sets. Thus, a custom <tt>equals</tt> method for a
+ * collection class that implements neither the <tt>List</tt> nor
+ * <tt>Set</tt> interface must return <tt>false</tt> when this collection
+ * is compared to any list or set. (By the same logic, it is not possible
+ * to write a class that correctly implements both the <tt>Set</tt> and
+ * <tt>List</tt> interfaces.)
+ *
+ * @param o object to be compared for equality with this collection
+ * @return <tt>true</tt> if the specified object is equal to this
+ * collection
+ *
+ * @see Object#equals(Object)
+ * @see Set#equals(Object)
+ * @see List#equals(Object)
+ */
+ boolean equals(Object o);
+
+ /**
+ * Returns the hash code value for this collection. While the
+ * <tt>Collection</tt> interface adds no stipulations to the general
+ * contract for the <tt>Object.hashCode</tt> method, programmers should
+ * take note that any class that overrides the <tt>Object.equals</tt>
+ * method must also override the <tt>Object.hashCode</tt> method in order
+ * to satisfy the general contract for the <tt>Object.hashCode</tt>method.
+ * In particular, <tt>c1.equals(c2)</tt> implies that
+ * <tt>c1.hashCode()==c2.hashCode()</tt>.
+ *
+ * @return the hash code value for this collection
+ *
+ * @see Object#hashCode()
+ * @see Object#equals(Object)
+ */
+ int hashCode();
+}
Added: trunk/core/src/openjdk/java/java/util/Comparator.java
===================================================================
--- trunk/core/src/openjdk/java/java/util/Comparator.java (rev 0)
+++ trunk/core/src/openjdk/java/java/util/Comparator.java 2007-08-11 19:55:49 UTC (rev 3391)
@@ -0,0 +1,164 @@
+/*
+ * Copyright 1997-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.util;
+
+/**
+ * A comparison function, which imposes a <i>total ordering</i> on some
+ * collection of objects. Comparators can be passed to a sort method (such
+ * as {@link Collections#sort(List,Comparator) Collections.sort} or {@link
+ * Arrays#sort(Object[],Comparator) Arrays.sort}) to allow precise control
+ * over the sort order. Comparators can also be used to control the order of
+ * certain data structures (such as {@link SortedSet sorted sets} or {@link
+ * SortedMap sorted maps}), or to provide an ordering for collections of
+ * objects that don't have a {@link Comparable natural ordering}.<p>
+ *
+ * The ordering imposed by a comparator <tt>c</tt> on a set of elements
+ * <tt>S</tt> is said to be <i>consistent with equals</i> if and only if
+ * <tt>c.compare(e1, e2)==0</tt> has the same boolean value as
+ * <tt>e1.equals(e2)</tt> for every <tt>e1</tt> and <tt>e2</tt> in
+ * <tt>S</tt>.<p>
+ *
+ * Caution should be exercised when using a comparator capable of imposing an
+ * ordering inconsistent with equals to order a sorted set (or sorted map).
+ * Suppose a sorted set (or sorted map) with an explicit comparator <tt>c</tt>
+ * is used with elements (or keys) drawn from a set <tt>S</tt>. If the
+ * ordering imposed by <tt>c</tt> on <tt>S</tt> is inconsistent with equals,
+ * the sorted set (or sorted map) will behave "strangely." In particular the
+ * sorted set (or sorted map) will violate the general contract for set (or
+ * map), which is defined in terms of <tt>equals</tt>.<p>
+ *
+ * For example, suppose one adds two elements {@code a} and {@code b} such that
+ * {@code (a.equals(b) && c.compare(a, b) != 0)}
+ * to an empty {@code TreeSet} with comparator {@code c}.
+ * The second {@code add} operation will return
+ * true (and the size of the tree set will increase) because {@code a} and
+ * {@code b} are not equivalent from the tree set's perspective, even though
+ * this is contrary to the specification of the
+ * {@link Set#add Set.add} method.<p>
+ *
+ * Note: It is generally a good idea for comparators to also implement
+ * <tt>java.io.Serializable</tt>, as they may be used as ordering methods in
+ * serializable data structures (like {@link TreeSet}, {@link TreeMap}). In
+ * order for the data structure to serialize successfully, the comparator (if
+ * provided) must implement <tt>Serializable</tt>.<p>
+ *
+ * For the mathematically inclined, the <i>relation</i> that defines the
+ * <i>imposed ordering</i> that a given comparator <tt>c</tt> imposes on a
+ * given set of objects <tt>S</tt> is:<pre>
+ * {(x, y) such that c.compare(x, y) <= 0}.
+ * </pre> The <i>quotient</i> for this total order is:<pre>
+ * {(x, y) such that c.compare(x, y) == 0}.
+ * </pre>
+ *
+ * It follows immediately from the contract for <tt>compare</tt> that the
+ * quotient is an <i>equivalence relation</i> on <tt>S</tt>, and that the
+ * imposed ordering is a <i>total order</i> on <tt>S</tt>. When we say that
+ * the ordering imposed by <tt>c</tt> on <tt>S</tt> is <i>consistent with
+ * equals</i>, we mean that the quotient for the ordering is the equivalence
+ * relation defined by the objects' {@link Object#equals(Object)
+ * equals(Object)} method(s):<pre>
+ * {(x, y) such that x.equals(y)}. </pre><p>
+ *
+ * This interface is a member of the
+ * <a href="{@docRoot}/../technotes/guides/collections/index.html">
+ * Java Collections Framework</a>.
+ *
+ * @param <T> the type of objects that may be compared by this comparator
+ *
+ * @author Josh Bloch
+ * @author Neal Gafter
+ * @version 1.32, 05/05/07
+ * @see Comparable
+ * @see java.io.Serializable
+ * @since 1.2
+ */
+
+public interface Comparator<T> {
+ /**
+ * Compares its two arguments for order. Returns a negative integer,
+ * zero, or a positive integer as the first argument is less than, equal
+ * to, or greater than the second.<p>
+ *
+ * In the foregoing description, the notation
+ * <tt>sgn(</tt><i>expression</i><tt>)</tt> designates the mathematical
+ * <i>signum</i> function, which is defined to return one of <tt>-1</tt>,
+ * <tt>0</tt>, or <tt>1</tt> according to whether the value of
+ * <i>expression</i> is negative, zero or positive.<p>
+ *
+ * The implementor must ensure that <tt>sgn(compare(x, y)) ==
+ * -sgn(compare(y, x))</tt> for all <tt>x</tt> and <tt>y</tt>. (This
+ * implies that <tt>compare(x, y)</tt> must throw an exception if and only
+ * if <tt>compare(y, x)</tt> throws an exception.)<p>
+ *
+ * The implementor must also ensure that the relation is transitive:
+ * <tt>((compare(x, y)>0) && (compare(y, z)>0))</tt> implies
+ * <tt>compare(x, z)>0</tt>.<p>
+ *
+ * Finally, the implementor must ensure that <tt>compare(x, y)==0</tt>
+ * implies that <tt>sgn(compare(x, z))==sgn(compare(y, z))</tt> for all
+ * <tt>z</tt>.<p>
+ *
+ * It is generally the case, but <i>not</i> strictly required that
+ * <tt>(compare(x, y)==0) == (x.equals(y))</tt>. Generally speaking,
+ * any comparator that violates this condition should clearly indicate
+ * this fact. The recommended la...
[truncated message content] |
|
From: <ls...@us...> - 2007-08-31 20:45:20
|
Revision: 3445
http://jnode.svn.sourceforge.net/jnode/?rev=3445&view=rev
Author: lsantha
Date: 2007-08-31 13:45:14 -0700 (Fri, 31 Aug 2007)
Log Message:
-----------
Openjdk integration.
Modified Paths:
--------------
trunk/core/src/openjdk/vm/java/io/NativeFileSystem.java
Added Paths:
-----------
trunk/core/src/openjdk/java/java/io/ExpiringCache.java
trunk/core/src/openjdk/java/java/io/UnixFileSystem.java
trunk/core/src/openjdk/vm/java/io/NativeUnixFileSystem.java
Added: trunk/core/src/openjdk/java/java/io/ExpiringCache.java
===================================================================
--- trunk/core/src/openjdk/java/java/io/ExpiringCache.java (rev 0)
+++ trunk/core/src/openjdk/java/java/io/ExpiringCache.java 2007-08-31 20:45:14 UTC (rev 3445)
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2002-2004 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @(#)ExpiringCache.java 1.12 07/05/05
+ */
+
+package java.io;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.LinkedHashMap;
+import java.util.Set;
+
+class ExpiringCache {
+ private long millisUntilExpiration;
+ private Map map;
+ // Clear out old entries every few queries
+ private int queryCount;
+ private int queryOverflow = 300;
+ private int MAX_ENTRIES = 200;
+
+ static class Entry {
+ private long timestamp;
+ private String val;
+
+ Entry(long timestamp, String val) {
+ this.timestamp = timestamp;
+ this.val = val;
+ }
+
+ long timestamp() { return timestamp; }
+ void setTimestamp(long timestamp) { this.timestamp = timestamp; }
+
+ String val() { return val; }
+ void setVal(String val) { this.val = val; }
+ }
+
+ ExpiringCache() {
+ this(30000);
+ }
+
+ ExpiringCache(long millisUntilExpiration) {
+ this.millisUntilExpiration = millisUntilExpiration;
+ map = new LinkedHashMap() {
+ protected boolean removeEldestEntry(Map.Entry eldest) {
+ return size() > MAX_ENTRIES;
+ }
+ };
+ }
+
+ synchronized String get(String key) {
+ if (++queryCount >= queryOverflow) {
+ cleanup();
+ }
+ Entry entry = entryFor(key);
+ if (entry != null) {
+ return entry.val();
+ }
+ return null;
+ }
+
+ synchronized void put(String key, String val) {
+ if (++queryCount >= queryOverflow) {
+ cleanup();
+ }
+ Entry entry = entryFor(key);
+ if (entry != null) {
+ entry.setTimestamp(System.currentTimeMillis());
+ entry.setVal(val);
+ } else {
+ map.put(key, new Entry(System.currentTimeMillis(), val));
+ }
+ }
+
+ synchronized void clear() {
+ map.clear();
+ }
+
+ private Entry entryFor(String key) {
+ Entry entry = (Entry) map.get(key);
+ if (entry != null) {
+ long delta = System.currentTimeMillis() - entry.timestamp();
+ if (delta < 0 || delta >= millisUntilExpiration) {
+ map.remove(key);
+ entry = null;
+ }
+ }
+ return entry;
+ }
+
+ private void cleanup() {
+ Set keySet = map.keySet();
+ // Avoid ConcurrentModificationExceptions
+ String[] keys = new String[keySet.size()];
+ int i = 0;
+ for (Iterator iter = keySet.iterator(); iter.hasNext(); ) {
+ String key = (String) iter.next();
+ keys[i++] = key;
+ }
+ for (int j = 0; j < keys.length; j++) {
+ entryFor(keys[j]);
+ }
+ queryCount = 0;
+ }
+}
Added: trunk/core/src/openjdk/java/java/io/UnixFileSystem.java
===================================================================
--- trunk/core/src/openjdk/java/java/io/UnixFileSystem.java (rev 0)
+++ trunk/core/src/openjdk/java/java/io/UnixFileSystem.java 2007-08-31 20:45:14 UTC (rev 3445)
@@ -0,0 +1,323 @@
+/*
+ * Copyright 1998-2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.io;
+
+import java.security.AccessController;
+import sun.security.action.GetPropertyAction;
+
+
+class UnixFileSystem extends FileSystem {
+
+ private final char slash;
+ private final char colon;
+ private final String javaHome;
+
+ public UnixFileSystem() {
+ slash =
+ ((String) AccessController.doPrivileged(
+ new GetPropertyAction("file.separator"))).charAt(0);
+ colon =
+ ((String) AccessController.doPrivileged(
+ new GetPropertyAction("path.separator"))).charAt(0);
+ javaHome =
+ (String) AccessController.doPrivileged(
+ new GetPropertyAction("java.home"));
+ }
+
+
+ /* -- Normalization and construction -- */
+
+ public char getSeparator() {
+ return slash;
+ }
+
+ public char getPathSeparator() {
+ return colon;
+ }
+
+ /* A normal Unix pathname contains no duplicate slashes and does not end
+ with a slash. It may be the empty string. */
+
+ /* Normalize the given pathname, whose length is len, starting at the given
+ offset; everything before this offset is already normal. */
+ private String normalize(String pathname, int len, int off) {
+ if (len == 0) return pathname;
+ int n = len;
+ while ((n > 0) && (pathname.charAt(n - 1) == '/')) n--;
+ if (n == 0) return "/";
+ StringBuffer sb = new StringBuffer(pathname.length());
+ if (off > 0) sb.append(pathname.substring(0, off));
+ char prevChar = 0;
+ for (int i = off; i < n; i++) {
+ char c = pathname.charAt(i);
+ if ((prevChar == '/') && (c == '/')) continue;
+ sb.append(c);
+ prevChar = c;
+ }
+ return sb.toString();
+ }
+
+ /* Check that the given pathname is normal. If not, invoke the real
+ normalizer on the part of the pathname that requires normalization.
+ This way we iterate through the whole pathname string only once. */
+ public String normalize(String pathname) {
+ int n = pathname.length();
+ char prevChar = 0;
+ for (int i = 0; i < n; i++) {
+ char c = pathname.charAt(i);
+ if ((prevChar == '/') && (c == '/'))
+ return normalize(pathname, n, i - 1);
+ prevChar = c;
+ }
+ if (prevChar == '/') return normalize(pathname, n, n - 1);
+ return pathname;
+ }
+
+ public int prefixLength(String pathname) {
+ if (pathname.length() == 0) return 0;
+ return (pathname.charAt(0) == '/') ? 1 : 0;
+ }
+
+ public String resolve(String parent, String child) {
+ if (child.equals("")) return parent;
+ if (child.charAt(0) == '/') {
+ if (parent.equals("/")) return child;
+ return parent + child;
+ }
+ if (parent.equals("/")) return parent + child;
+ return parent + '/' + child;
+ }
+
+ public String getDefaultParent() {
+ return "/";
+ }
+
+ public String fromURIPath(String path) {
+ String p = path;
+ if (p.endsWith("/") && (p.length() > 1)) {
+ // "/foo/" --> "/foo", but "/" --> "/"
+ p = p.substring(0, p.length() - 1);
+ }
+ return p;
+ }
+
+
+ /* -- Path operations -- */
+
+ public boolean isAbsolute(File f) {
+ return (f.getPrefixLength() != 0);
+ }
+
+ public String resolve(File f) {
+ if (isAbsolute(f)) return f.getPath();
+ return resolve(System.getProperty("user.dir"), f.getPath());
+ }
+
+ // Caches for canonicalization results to improve startup performance.
+ // The first cache handles repeated canonicalizations of the same path
+ // name. The prefix cache handles repeated canonicalizations within the
+ // same directory, and must not create results differing from the true
+ // canonicalization algorithm in canonicalize_md.c. For this reason the
+ // prefix cache is conservative and is not used for complex path names.
+ private ExpiringCache cache = new ExpiringCache();
+ // On Unix symlinks can jump anywhere in the file system, so we only
+ // treat prefixes in java.home as trusted and cacheable in the
+ // canonicalization algorithm
+ private ExpiringCache javaHomePrefixCache = new ExpiringCache();
+
+ public String canonicalize(String path) throws IOException {
+ if (!useCanonCaches) {
+ return canonicalize0(path);
+ } else {
+ String res = cache.get(path);
+ if (res == null) {
+ String dir = null;
+ String resDir = null;
+ if (useCanonPrefixCache) {
+ // Note that this can cause symlinks that should
+ // be resolved to a destination directory to be
+ // resolved to the directory they're contained in
+ dir = parentOrNull(path);
+ if (dir != null) {
+ resDir = javaHomePrefixCache.get(dir);
+ if (resDir != null) {
+ // Hit only in prefix cache; full path is canonical
+ String filename = path.substring(1 + dir.length());
+ res = resDir + slash + filename;
+ cache.put(dir + slash + filename, res);
+ }
+ }
+ }
+ if (res == null) {
+ res = canonicalize0(path);
+ cache.put(path, res);
+ if (useCanonPrefixCache &&
+ dir != null && dir.startsWith(javaHome)) {
+ resDir = parentOrNull(res);
+ // Note that we don't allow a resolved symlink
+ // to elsewhere in java.home to pollute the
+ // prefix cache (java.home prefix cache could
+ // just as easily be a set at this point)
+ if (resDir != null && resDir.equals(dir)) {
+ File f = new File(res);
+ if (f.exists() && !f.isDirectory()) {
+ javaHomePrefixCache.put(dir, resDir);
+ }
+ }
+ }
+ }
+ }
+ assert canonicalize0(path).equals(res) || path.startsWith(javaHome);
+ return res;
+ }
+ }
+ private native String canonicalize0(String path) throws IOException;
+ // Best-effort attempt to get parent of this path; used for
+ // optimization of filename canonicalization. This must return null for
+ // any cases where the code in canonicalize_md.c would throw an
+ // exception or otherwise deal with non-simple pathnames like handling
+ // of "." and "..". It may conservatively return null in other
+ // situations as well. Returning null will cause the underlying
+ // (expensive) canonicalization routine to be called.
+ static String parentOrNull(String path) {
+ if (path == null) return null;
+ char sep = File.separatorChar;
+ int last = path.length() - 1;
+ int idx = last;
+ int adjacentDots = 0;
+ int nonDotCount = 0;
+ while (idx > 0) {
+ char c = path.charAt(idx);
+ if (c == '.') {
+ if (++adjacentDots >= 2) {
+ // Punt on pathnames containing . and ..
+ return null;
+ }
+ } else if (c == sep) {
+ if (adjacentDots == 1 && nonDotCount == 0) {
+ // Punt on pathnames containing . and ..
+ return null;
+ }
+ if (idx == 0 ||
+ idx >= last - 1 ||
+ path.charAt(idx - 1) == sep) {
+ // Punt on pathnames containing adjacent slashes
+ // toward the end
+ return null;
+ }
+ return path.substring(0, idx);
+ } else {
+ ++nonDotCount;
+ adjacentDots = 0;
+ }
+ --idx;
+ }
+ return null;
+ }
+
+ /* -- Attribute accessors -- */
+
+ public native int getBooleanAttributes0(File f);
+
+ public int getBooleanAttributes(File f) {
+ int rv = getBooleanAttributes0(f);
+ String name = f.getName();
+ boolean hidden = (name.length() > 0) && (name.charAt(0) == '.');
+ return rv | (hidden ? BA_HIDDEN : 0);
+ }
+
+ public native boolean checkAccess(File f, int access);
+ public native long getLastModifiedTime(File f);
+ public native long getLength(File f);
+ public native boolean setPermission(File f, int access, boolean enable, boolean owneronly);
+
+ /* -- File operations -- */
+
+ public native boolean createFileExclusively(String path)
+ throws IOException;
+ public boolean delete(File f) {
+ // Keep canonicalization caches in sync after file deletion
+ // and renaming operations. Could be more clever than this
+ // (i.e., only remove/update affected entries) but probably
+ // not worth it since these entries expire after 30 seconds
+ // anyway.
+ cache.clear();
+ javaHomePrefixCache.clear();
+ return delete0(f);
+ }
+ private native boolean delete0(File f);
+ public native String[] list(File f);
+ public native boolean createDirectory(File f);
+ public boolean rename(File f1, File f2) {
+ // Keep canonicalization caches in sync after file deletion
+ // and renaming operations. Could be more clever than this
+ // (i.e., only remove/update affected entries) but probably
+ // not worth it since these entries expire after 30 seconds
+ // anyway.
+ cache.clear();
+ javaHomePrefixCache.clear();
+ return rename0(f1, f2);
+ }
+ private native boolean rename0(File f1, File f2);
+ public native boolean setLastModifiedTime(File f, long time);
+ public native boolean setReadOnly(File f);
+
+
+ /* -- Filesystem interface -- */
+
+ public File[] listRoots() {
+ try {
+ SecurityManager security = System.getSecurityManager();
+ if (security != null) {
+ security.checkRead("/");
+ }
+ return new File[] { new File("/") };
+ } catch (SecurityException x) {
+ return new File[0];
+ }
+ }
+
+ /* -- Disk usage -- */
+ public native long getSpace(File f, int t);
+
+ /* -- Basic infrastructure -- */
+
+ public int compare(File f1, File f2) {
+ return f1.getPath().compareTo(f2.getPath());
+ }
+
+ public int hashCode(File f) {
+ return f.getPath().hashCode() ^ 1234321;
+ }
+
+
+ private static native void initIDs();
+
+ static {
+ initIDs();
+ }
+
+}
Modified: trunk/core/src/openjdk/vm/java/io/NativeFileSystem.java
===================================================================
--- trunk/core/src/openjdk/vm/java/io/NativeFileSystem.java 2007-08-31 20:36:35 UTC (rev 3444)
+++ trunk/core/src/openjdk/vm/java/io/NativeFileSystem.java 2007-08-31 20:45:14 UTC (rev 3445)
@@ -13,6 +13,7 @@
*/
public static Object getFileSystem()
{
- return new JNodeFileSystem();
+ //return new JNodeFileSystem();
+ return new UnixFileSystem();
}
}
Added: trunk/core/src/openjdk/vm/java/io/NativeUnixFileSystem.java
===================================================================
--- trunk/core/src/openjdk/vm/java/io/NativeUnixFileSystem.java (rev 0)
+++ trunk/core/src/openjdk/vm/java/io/NativeUnixFileSystem.java 2007-08-31 20:45:14 UTC (rev 3445)
@@ -0,0 +1,120 @@
+/*
+ * $Id$
+ */
+package java.io;
+
+/**
+ * @author Levente S\xE1ntha
+ */
+public class NativeUnixFileSystem {
+ private static String canonicalize0(UnixFileSystem ufs, String path) throws IOException {
+ // note : we expect that the File class from OpenJDK give an absolute path
+ return VMFile.toCanonicalForm(path);
+ }
+
+ private static int getBooleanAttributes0(UnixFileSystem ufs, File f) {
+ int attributes = 0;
+
+ attributes |= (VMFile.exists(f.getPath()) ? FileSystem.BA_EXISTS : 0);
+ attributes |= (VMFile.isFile(f.getPath()) ? FileSystem.BA_REGULAR : 0);
+ attributes |= (VMFile.isDirectory(f.getPath()) ? FileSystem.BA_DIRECTORY : 0);
+ attributes |= (VMFile.isHidden(f.getPath()) ? FileSystem.BA_HIDDEN : 0);
+
+ return attributes;
+ }
+
+ private static boolean checkAccess(UnixFileSystem ufs, File f, int access) {
+ boolean canAccess;
+ if (! VMFile.exists(f.getPath()))
+ return false;
+
+ switch(access)
+ {
+ case FileSystem.ACCESS_READ: canAccess = VMFile.canRead(f.getPath()); break;
+ case FileSystem.ACCESS_WRITE:
+ if (VMFile.isDirectory(f.getPath()))
+ canAccess = VMFile.canWriteDirectory(f);
+ else
+ canAccess = VMFile.canWrite(f.getPath());
+
+ break;
+ case FileSystem.ACCESS_EXECUTE: canAccess = VMFile.canExecute(f.getPath()); break;
+ default: throw new IllegalArgumentException("invalid access : "+access);
+ }
+ return canAccess;
+ }
+
+ private static long getLastModifiedTime(UnixFileSystem ufs, File f) {
+ return VMFile.lastModified(f.getPath());
+ }
+
+ private static long getLength(UnixFileSystem ufs, File f) {
+ return VMFile.length(f.getPath());
+ }
+
+ private static boolean setPermission(UnixFileSystem ufs, File f, int access, boolean enable, boolean owneronly) {
+ boolean success = false;
+ switch(access)
+ {
+ case FileSystem.ACCESS_READ: success = VMFile.setReadable(f.getPath(), enable, owneronly); break;
+ case FileSystem.ACCESS_WRITE: success = VMFile.setWritable(f.getPath(), enable, owneronly); break;
+ case FileSystem.ACCESS_EXECUTE: success = VMFile.setExecutable(f.getPath(), enable, owneronly); break;
+ }
+ return success;
+ }
+
+ private static boolean createFileExclusively(UnixFileSystem ufs, String path) {
+ try {
+ return VMFile.create(path);
+ } catch(IOException ioe){
+ return false;
+ }
+ }
+
+ private static boolean delete0(UnixFileSystem ufs, File f) {
+ return VMFile.delete(f.getPath());
+ }
+
+ private static String[] list(UnixFileSystem ufs, File f) {
+ if (!f.exists() || !f.isDirectory())
+ return null;
+
+ // Get the list of files
+ return VMFile.list(f.getPath());
+ }
+
+ private static boolean createDirectory(UnixFileSystem ufs, File f) {
+ return VMFile.mkdir(f.getPath());
+ }
+
+ private static boolean rename0(UnixFileSystem ufs, File f1, File f2) {
+ return VMFile.renameTo(f1.getPath(), f2.getPath());
+ }
+
+ private static boolean setLastModifiedTime(UnixFileSystem ufs, File f, long time) {
+ return VMFile.setLastModified(f.getPath(), time);
+ }
+
+ private static boolean setReadOnly(UnixFileSystem ufs, File f) {
+ // Test for existence.
+ if (! VMFile.exists(f.getPath()))
+ return false;
+
+ return VMFile.setReadOnly(f.getPath());
+ }
+
+ private static long getSpace(UnixFileSystem ufs, File f, int t) {
+ long space = 0L;
+ switch(t)
+ {
+ case FileSystem.SPACE_TOTAL: space = VMFile.getTotalSpace(f.getPath()); break; //TODO
+ case FileSystem.SPACE_FREE: space = VMFile.getFreeSpace(f.getPath()); break; //TODO
+ case FileSystem.SPACE_USABLE: space = VMFile.getUsableSpace(f.getPath()); break; //TODO
+ }
+ return space;
+ }
+
+ private static void initIDs() {
+
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2007-09-06 19:09:13
|
Revision: 3464
http://jnode.svn.sourceforge.net/jnode/?rev=3464&view=rev
Author: lsantha
Date: 2007-09-06 12:09:11 -0700 (Thu, 06 Sep 2007)
Log Message:
-----------
openjdk integration
Added Paths:
-----------
trunk/core/src/openjdk/java/java/applet/
trunk/core/src/openjdk/java/java/applet/Applet.java
trunk/core/src/openjdk/java/java/applet/AppletContext.java
trunk/core/src/openjdk/java/java/applet/AppletStub.java
trunk/core/src/openjdk/java/java/applet/AudioClip.java
trunk/core/src/openjdk/java/java/applet/package.html
trunk/core/src/openjdk/java/java/io/EOFException.java
trunk/core/src/openjdk/java/java/io/Externalizable.java
trunk/core/src/openjdk/java/java/io/FilenameFilter.java
trunk/core/src/openjdk/java/java/io/StreamTokenizer.java
trunk/core/src/openjdk/java/java/io/UTFDataFormatException.java
trunk/core/src/openjdk/java/java/lang/Number.java
trunk/core/src/openjdk/java/java/lang/Object.java.stop
trunk/core/src/openjdk/java/java/lang/Process.java
trunk/core/src/openjdk/java/java/lang/ThreadDeath.java
trunk/core/src/openjdk/java/java/net/BindException.java
trunk/core/src/openjdk/java/java/net/ConnectException.java
trunk/core/src/openjdk/java/java/net/ContentHandlerFactory.java
trunk/core/src/openjdk/java/java/net/DatagramSocketImplFactory.java
trunk/core/src/openjdk/java/java/net/FileNameMap.java
trunk/core/src/openjdk/java/java/net/MalformedURLException.java
trunk/core/src/openjdk/java/java/net/NoRouteToHostException.java
trunk/core/src/openjdk/java/java/net/PortUnreachableException.java
trunk/core/src/openjdk/java/java/net/ProtocolException.java
trunk/core/src/openjdk/java/java/net/SocketException.java
trunk/core/src/openjdk/java/java/net/SocketImplFactory.java
trunk/core/src/openjdk/java/java/net/SocketOptions.java
trunk/core/src/openjdk/java/java/net/SocketTimeoutException.java
trunk/core/src/openjdk/java/java/net/URISyntaxException.java
trunk/core/src/openjdk/java/java/net/URLStreamHandlerFactory.java
trunk/core/src/openjdk/java/java/net/UnknownHostException.java
trunk/core/src/openjdk/java/java/net/UnknownServiceException.java
trunk/core/src/openjdk/java/java/net/package.html
trunk/core/src/openjdk/java/java/security/AccessControlException.java
trunk/core/src/openjdk/java/java/security/AlgorithmParameterGeneratorSpi.java
trunk/core/src/openjdk/java/java/security/AlgorithmParametersSpi.java
trunk/core/src/openjdk/java/java/security/Certificate.java
trunk/core/src/openjdk/java/java/security/DigestException.java
trunk/core/src/openjdk/java/java/security/DomainCombiner.java
trunk/core/src/openjdk/java/java/security/GeneralSecurityException.java
trunk/core/src/openjdk/java/java/security/Guard.java
trunk/core/src/openjdk/java/java/security/InvalidAlgorithmParameterException.java
trunk/core/src/openjdk/java/java/security/InvalidKeyException.java
trunk/core/src/openjdk/java/java/security/InvalidParameterException.java
trunk/core/src/openjdk/java/java/security/Key.java
trunk/core/src/openjdk/java/java/security/KeyException.java
trunk/core/src/openjdk/java/java/security/KeyFactorySpi.java
trunk/core/src/openjdk/java/java/security/KeyManagementException.java
trunk/core/src/openjdk/java/java/security/KeyPair.java
trunk/core/src/openjdk/java/java/security/KeyPairGenerator.java
trunk/core/src/openjdk/java/java/security/KeyPairGeneratorSpi.java
trunk/core/src/openjdk/java/java/security/KeyStoreException.java
trunk/core/src/openjdk/java/java/security/NoSuchAlgorithmException.java
trunk/core/src/openjdk/java/java/security/NoSuchProviderException.java
trunk/core/src/openjdk/java/java/security/Principal.java
trunk/core/src/openjdk/java/java/security/PrivateKey.java
trunk/core/src/openjdk/java/java/security/PrivilegedAction.java
trunk/core/src/openjdk/java/java/security/PrivilegedActionException.java
trunk/core/src/openjdk/java/java/security/PrivilegedExceptionAction.java
trunk/core/src/openjdk/java/java/security/ProviderException.java
trunk/core/src/openjdk/java/java/security/PublicKey.java
trunk/core/src/openjdk/java/java/security/SecureRandomSpi.java
trunk/core/src/openjdk/java/java/security/SignatureException.java
trunk/core/src/openjdk/java/java/text/Annotation.java
trunk/core/src/openjdk/java/java/text/AttributedCharacterIterator.java
trunk/core/src/openjdk/java/java/text/AttributedString.java
trunk/core/src/openjdk/java/java/text/CharacterIterator.java
trunk/core/src/openjdk/java/java/text/Format.java
trunk/core/src/openjdk/java/java/text/MessageFormat.java
trunk/core/src/openjdk/java/java/text/ParseException.java
trunk/core/src/openjdk/java/java/text/ParsePosition.java
trunk/core/src/openjdk/java/java/text/StringCharacterIterator.java
trunk/core/src/openjdk/vm/java/lang/NativeObject.java
Added: trunk/core/src/openjdk/java/java/applet/Applet.java
===================================================================
--- trunk/core/src/openjdk/java/java/applet/Applet.java (rev 0)
+++ trunk/core/src/openjdk/java/java/applet/Applet.java 2007-09-06 19:09:11 UTC (rev 3464)
@@ -0,0 +1,579 @@
+/*
+ * Copyright 1995-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package java.applet;
+
+import java.awt.*;
+import java.awt.image.ColorModel;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.util.Hashtable;
+import java.util.Locale;
+import javax.accessibility.*;
+
+/**
+ * An applet is a small program that is intended not to be run on
+ * its own, but rather to be embedded inside another application.
+ * <p>
+ * The <code>Applet</code> class must be the superclass of any
+ * applet that is to be embedded in a Web page or viewed by the Java
+ * Applet Viewer. The <code>Applet</code> class provides a standard
+ * interface between applets and their environment.
+ *
+ * @author Arthur van Hoff
+ * @author Chris Warth
+ * @version 1.89, 05/05/07
+ * @since JDK1.0
+ */
+public class Applet extends Panel {
+
+ /**
+ * Constructs a new Applet.
+ * <p>
+ * Note: Many methods in <code>java.applet.Applet</code>
+ * may be invoked by the applet only after the applet is
+ * fully constructed; applet should avoid calling methods
+ * in <code>java.applet.Applet</code> in the constructor.
+ *
+ * @exception HeadlessException if GraphicsEnvironment.isHeadless()
+ * returns true.
+ * @see java.awt.GraphicsEnvironment#isHeadless
+ * @since 1.4
+ */
+ public Applet() throws HeadlessException {
+ if (GraphicsEnvironment.isHeadless()) {
+ throw new HeadlessException();
+ }
+ }
+
+ /**
+ * Applets can be serialized but the following conventions MUST be followed:
+ *
+ * Before Serialization:
+ * An applet must be in STOPPED state.
+ *
+ * After Deserialization:
+ * The applet will be restored in STOPPED state (and most clients will
+ * likely move it into RUNNING state).
+ * The stub field will be restored by the reader.
+ */
+ transient private AppletStub stub;
+
+ /* version ID for serialized form. */
+ private static final long serialVersionUID = -5836846270535785031L;
+
+ /**
+ * Read an applet from an object input stream.
+ * @exception HeadlessException if
+ * <code>GraphicsEnvironment.isHeadless()</code> returns
+ * <code>true</code>
+ * @serial
+ * @see java.awt.GraphicsEnvironment#isHeadless
+ * @since 1.4
+ */
+ private void readObject(ObjectInputStream s)
+ throws ClassNotFoundException, IOException, HeadlessException {
+ if (GraphicsEnvironment.isHeadless()) {
+ throw new HeadlessException();
+ }
+ s.defaultReadObject();
+ }
+
+ /**
+ * Sets this applet's stub. This is done automatically by the system.
+ * <p>If there is a security manager, its <code> checkPermission </code>
+ * method is called with the
+ * <code>AWTPermission("setAppletStub")</code>
+ * permission if a stub has already been set.
+ * @param stub the new stub.
+ * @exception SecurityException if the caller cannot set the stub
+ */
+ public final void setStub(AppletStub stub) {
+ if (this.stub != null) {
+ SecurityManager s = System.getSecurityManager();
+ if (s != null) {
+ s.checkPermission(new AWTPermission("setAppletStub"));
+ }
+ }
+ this.stub = (AppletStub)stub;
+ }
+
+ /**
+ * Determines if this applet is active. An applet is marked active
+ * just before its <code>start</code> method is called. It becomes
+ * inactive just before its <code>stop</code> method is called.
+ *
+ * @return <code>true</code> if the applet is active;
+ * <code>false</code> otherwise.
+ * @see java.applet.Applet#start()
+ * @see java.applet.Applet#stop()
+ */
+ public boolean isActive() {
+ if (stub != null) {
+ return stub.isActive();
+ } else { // If stub field not filled in, applet never active
+ return false;
+ }
+ }
+
+ /**
+ * Gets the URL of the document in which this applet is embedded.
+ * For example, suppose an applet is contained
+ * within the document:
+ * <blockquote><pre>
+ * http://java.sun.com/products/jdk/1.2/index.html
+ * </pre></blockquote>
+ * The document base is:
+ * <blockquote><pre>
+ * http://java.sun.com/products/jdk/1.2/index.html
+ * </pre></blockquote>
+ *
+ * @return the {@link java.net.URL} of the document that contains this
+ * applet.
+ * @see java.applet.Applet#getCodeBase()
+ */
+ public URL getDocumentBase() {
+ return stub.getDocumentBase();
+ }
+
+ /**
+ * Gets the base URL. This is the URL of the directory which contains this applet.
+ *
+ * @return the base {@link java.net.URL} of
+ * the directory which contains this applet.
+ * @see java.applet.Applet#getDocumentBase()
+ */
+ public URL getCodeBase() {
+ return stub.getCodeBase();
+ }
+
+ /**
+ * Returns the value of the named parameter in the HTML tag. For
+ * example, if this applet is specified as
+ * <blockquote><pre>
+ * <applet code="Clock" width=50 height=50>
+ * <param name=Color value="blue">
+ * </applet>
+ * </pre></blockquote>
+ * <p>
+ * then a call to <code>getParameter("Color")</code> returns the
+ * value <code>"blue"</code>.
+ * <p>
+ * The <code>name</code> argument is case insensitive.
+ *
+ * @param name a parameter name.
+ * @return the value of the named parameter,
+ * or <code>null</code> if not set.
+ */
+ public String getParameter(String name) {
+ return stub.getParameter(name);
+ }
+
+ /**
+ * Determines this applet's context, which allows the applet to
+ * query and affect the environment in which it runs.
+ * <p>
+ * This environment of an applet represents the document that
+ * contains the applet.
+ *
+ * @return the applet's context.
+ */
+ public AppletContext getAppletContext() {
+ return stub.getAppletContext();
+ }
+
+ /**
+ * Requests that this applet be resized.
+ *
+ * @param width the new requested width for the applet.
+ * @param height the new requested height for the applet.
+ */
+ public void resize(int width, int height) {
+ Dimension d = size();
+ if ((d.width != width) || (d.height != height)) {
+ super.resize(width, height);
+ if (stub != null) {
+ stub.appletResize(width, height);
+ }
+ }
+ }
+
+ /**
+ * Requests that this applet be resized.
+ *
+ * @param d an object giving the new width and height.
+ */
+ public void resize(Dimension d) {
+ resize(d.width, d.height);
+ }
+
+ /**
+ * Requests that the argument string be displayed in the
+ * "status window". Many browsers and applet viewers
+ * provide such a window, where the application can inform users of
+ * its current state.
+ *
+ * @param msg a string to display in the status window.
+ */
+ public void showStatus(String msg) {
+ getAppletContext().showStatus(msg);
+ }
+
+ /**
+ * Returns an <code>Image</code> object that can then be painted on
+ * the screen. The <code>url</code> that is passed as an argument
+ * must specify an absolute URL.
+ * <p>
+ * This method always returns immediately, whether or not the image
+ * exists. When this applet attempts to draw the image on the screen,
+ * the data will be loaded. The graphics primitives that draw the
+ * image will incrementally paint on the screen.
+ *
+ * @param url an absolute URL giving the location of the image.
+ * @return the image at the specified URL.
+ * @see java.awt.Image
+ */
+ public Image getImage(URL url) {
+ return getAppletContext().getImage(url);
+ }
+
+ /**
+ * Returns an <code>Image</code> object that can then be painted on
+ * the screen. The <code>url</code> argument must specify an absolute
+ * URL. The <code>name</code> argument is a specifier that is
+ * relative to the <code>url</code> argument.
+ * <p>
+ * This method always returns immediately, whether or not the image
+ * exists. When this applet attempts to draw the image on the screen,
+ * the data will be loaded. The graphics primitives that draw the
+ * image will incrementally paint on the screen.
+ *
+ * @param url an absolute URL giving the base location of the image.
+ * @param name the location of the image, relative to the
+ * <code>url</code> argument.
+ * @return the image at the specified URL.
+ * @see java.awt.Image
+ */
+ public Image getImage(URL url, String name) {
+ try {
+ return getImage(new URL(url, name));
+ } catch (MalformedURLException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Get an audio clip from the given URL.
+ *
+ * @param url points to the audio clip
+ * @return the audio clip at the specified URL.
+ *
+ * @since 1.2
+ */
+ public final static AudioClip newAudioClip(URL url) {
+ return new sun.applet.AppletAudioClip(url);
+ }
+
+ /**
+ * Returns the <code>AudioClip</code> object specified by the
+ * <code>URL</code> argument.
+ * <p>
+ * This method always returns immediately, whether or not the audio
+ * clip exists. When this applet attempts to play the audio clip, the
+ * data will be loaded.
+ *
+ * @param url an absolute URL giving the location of the audio clip.
+ * @return the audio clip at the specified URL.
+ * @see java.applet.AudioClip
+ */
+ public AudioClip getAudioClip(URL url) {
+ return getAppletContext().getAudioClip(url);
+ }
+
+ /**
+ * Returns the <code>AudioClip</code> object specified by the
+ * <code>URL</code> and <code>name</code> arguments.
+ * <p>
+ * This method always returns immediately, whether or not the audio
+ * clip exists. When this applet attempts to play the audio clip, the
+ * data will be loaded.
+ *
+ * @param url an absolute URL giving the base location of the
+ * audio clip.
+ * @param name the location of the audio clip, relative to the
+ * <code>url</code> argument.
+ * @return the audio clip at the specified URL.
+ * @see java.applet.AudioClip
+ */
+ public AudioClip getAudioClip(URL url, String name) {
+ try {
+ return getAudioClip(new URL(url, name));
+ } catch (MalformedURLException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Returns information about this applet. An applet should override
+ * this method to return a <code>String</code> containing information
+ * about the author, version, and copyright of the applet.
+ * <p>
+ * The implementation of this method provided by the
+ * <code>Applet</code> class returns <code>null</code>.
+ *
+ * @return a string containing information about the author, version, and
+ * copyright of the applet.
+ */
+ public String getAppletInfo() {
+ return null;
+ }
+
+ /**
+ * Gets the locale of the applet. It allows the applet
+ * to maintain its own locale separated from the locale
+ * of the browser or appletviewer.
+ *
+ * @return the locale of the applet; if no locale has
+ * been set, the default locale is returned.
+ * @since JDK1.1
+ */
+ public Locale getLocale() {
+ Locale locale = super.getLocale();
+ if (locale == null) {
+ return Locale.getDefault();
+ }
+ return locale;
+ }
+
+ /**
+ * Returns information about the parameters that are understood by
+ * this applet. An applet should override this method to return an
+ * array of <code>Strings</code> describing these parameters.
+ * <p>
+ * Each element of the array should be a set of three
+ * <code>Strings</code> containing the name, the type, and a
+ * description. For example:
+ * <p><blockquote><pre>
+ * String pinfo[][] = {
+ * {"fps", "1-10", "frames per second"},
+ * {"repeat", "boolean", "repeat image loop"},
+ * {"imgs", "url", "images directory"}
+ * };
+ * </pre></blockquote>
+ * <p>
+ * The implementation of this method provided by the
+ * <code>Applet</code> class returns <code>null</code>.
+ *
+ * @return an array describing the parameters this applet looks for.
+ */
+ public String[][] getParameterInfo() {
+ return null;
+ }
+
+ /**
+ * Plays the audio clip at the specified absolute URL. Nothing
+ * happens if the audio clip cannot be found.
+ *
+ * @param url an absolute URL giving the location of the audio clip.
+ */
+ public void play(URL url) {
+ AudioClip clip = getAudioClip(url);
+ if (clip != null) {
+ clip.play();
+ }
+ }
+
+ /**
+ * Plays the audio clip given the URL and a specifier that is
+ * relative to it. Nothing happens if the audio clip cannot be found.
+ *
+ * @param url an absolute URL giving the base location of the
+ * audio clip.
+ * @param name the location of the audio clip, relative to the
+ * <code>url</code> argument.
+ */
+ public void play(URL url, String name) {
+ AudioClip clip = getAudioClip(url, name);
+ if (clip != null) {
+ clip.play();
+ }
+ }
+
+ /**
+ * Called by the browser or applet viewer to inform
+ * this applet that it has been loaded into the system. It is always
+ * called before the first time that the <code>start</code> method is
+ * called.
+ * <p>
+ * A subclass of <code>Applet</code> should override this method if
+ * it has initialization to perform. For example, an applet with
+ * threads would use the <code>init</code> method to create the
+ * threads and the <code>destroy</code> method to kill them.
+ * <p>
+ * The implementation of this method provided by the
+ * <code>Applet</code> class does nothing.
+ *
+ * @see java.applet.Applet#destroy()
+ * @see java.applet.Applet#start()
+ * @see java.applet.Applet#stop()
+ */
+ public void init() {
+ }
+
+ /**
+ * Called by the browser or applet viewer to inform
+ * this applet that it should start its execution. It is called after
+ * the <code>init</code> method and each time the applet is revisited
+ * in a Web page.
+ * <p>
+ * A subclass of <code>Applet</code> should override this method if
+ * it has any operation that it wants to perform each time the Web
+ * page containing it is visited. For example, an applet with
+ * animation might want to use the <code>start</code> method to
+ * resume animation, and the <code>stop</code> method to suspend the
+ * animation.
+ * <p>
+ * Note: some methods, such as <code>getLocationOnScreen</code>, can only
+ * provide meaningful results if the applet is showing. Because
+ * <code>isShowing</code> returns <code>false</code> when the applet's
+ * <code>start</code> is first called, methods requiring
+ * <code>isShowing</code> to return <code>true</code> should be called from
+ * a <code>ComponentListener</code>.
+ * <p>
+ * The implementation of this method provided by the
+ * <code>Applet</code> class does nothing.
+ *
+ * @see java.applet.Applet#destroy()
+ * @see java.applet.Applet#init()
+ * @see java.applet.Applet#stop()
+ * @see java.awt.Component#isShowing()
+ * @see java.awt.event.ComponentListener#componentShown(java.awt.event.ComponentEvent)
+ */
+ public void start() {
+ }
+
+ /**
+ * Called by the browser or applet viewer to inform
+ * this applet that it should stop its execution. It is called when
+ * the Web page that contains this applet has been replaced by
+ * another page, and also just before the applet is to be destroyed.
+ * <p>
+ * A subclass of <code>Applet</code> should override this method if
+ * it has any operation that it wants to perform each time the Web
+ * page containing it is no longer visible. For example, an applet
+ * with animation might want to use the <code>start</code> method to
+ * resume animation, and the <code>stop</code> method to suspend the
+ * animation.
+ * <p>
+ * The implementation of this method provided by the
+ * <code>Applet</code> class does nothing.
+ *
+ * @see java.applet.Applet#destroy()
+ * @see java.applet.Applet#init()
+ */
+ public void stop() {
+ }
+
+ /**
+ * Called by the browser or applet viewer to inform
+ * this applet that it is being reclaimed and that it should destroy
+ * any resources that it has allocated. The <code>stop</code> method
+ * will always be called before <code>destroy</code>.
+ * <p>
+ * A subclass of <code>Applet</code> should override this method if
+ * it has any operation that it wants to perform before it is
+ * destroyed. For example, an applet with threads would use the
+ * <code>init</code> method to create the threads and the
+ * <code>destroy</code> method to kill them.
+ * <p>
+ * The implementation of this method provided by the
+ * <code>Applet</code> class does nothing.
+ *
+ * @see java.applet.Applet#init()
+ * @see java.applet.Applet#start()
+ * @see java.applet.Applet#stop()
+ */
+ public void destroy() {
+ }
+
+ //
+ // Accessibility support
+ //
+
+ AccessibleContext accessibleContext = null;
+
+ /**
+ * Gets the AccessibleContext associated with this Applet.
+ * For applets, the AccessibleContext takes the form of an
+ * AccessibleApplet.
+ * A new AccessibleApplet instance is created if necessary.
+ *
+ * @return an AccessibleApplet that serves as the
+ * AccessibleContext of this Applet
+ * @since 1.3
+ */
+ public AccessibleContext getAccessibleContext() {
+ if (accessibleContext == null) {
+ accessibleContext = new AccessibleApplet();
+ }
+ return accessibleContext;
+ }
+
+ /**
+ * This class implements accessibility support for the
+ * <code>Applet</code> class. It provides an implementation of the
+ * Java Accessibility API appropriate to applet user-interface elements.
+ * @since 1.3
+ */
+ protected class AccessibleApplet extends AccessibleAWTPanel {
+
+ private static final long serialVersionUID = 8127374778187708896L;
+
+ /**
+ * Get the role of this object.
+ *
+ * @return an instance of AccessibleRole describing the role of the
+ * object
+ */
+ public AccessibleRole getAccessibleRole() {
+ return AccessibleRole.FRAME;
+ }
+
+ /**
+ * Get the state of this object.
+ *
+ * @return an instance of AccessibleStateSet containing the current
+ * state set of the object
+ * @see AccessibleState
+ */
+ public AccessibleStateSet getAccessibleStateSet() {
+ AccessibleStateSet states = super.getAccessibleStateSet();
+ states.add(AccessibleState.ACTIVE);
+ return states;
+ }
+
+ }
+}
Added: trunk/core/src/openjdk/java/java/applet/AppletContext.java
===================================================================
--- trunk/core/src/openjdk/java/java/applet/AppletContext.java (rev 0)
+++ trunk/core/src/openjdk/java/java/applet/AppletContext.java 2007-09-06 19:09:11 UTC (rev 3464)
@@ -0,0 +1,195 @@
+/*
+ * Copyright 1995-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.applet;
+
+import java.awt.Image;
+import java.awt.Graphics;
+import java.awt.image.ColorModel;
+import java.net.URL;
+import java.util.Enumeration;
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+/**
+ * This interface corresponds to an applet's environment: the
+ * document containing the applet and the other applets in the same
+ * document.
+ * <p>
+ * The methods in this interface can be used by an applet to obtain
+ * information about its environment.
+ *
+ * @author Arthur van Hoff
+ * @version 1.41, 05/05/07
+ * @since JDK1.0
+ */
+public interface AppletContext {
+ /**
+ * Creates an audio clip.
+ *
+ * @param url an absolute URL giving the location of the audio clip.
+ * @return the audio clip at the specified URL.
+ */
+ AudioClip getAudioClip(URL url);
+
+ /**
+ * Returns an <code>Image</code> object that can then be painted on
+ * the screen. The <code>url</code> argument<code> </code>that is
+ * passed as an argument must specify an absolute URL.
+ * <p>
+ * This method always returns immediately, whether or not the image
+ * exists. When the applet attempts to draw the image on the screen,
+ * the data will be loaded. The graphics primitives that draw the
+ * image will incrementally paint on the screen.
+ *
+ * @param url an absolute URL giving the location of the image.
+ * @return the image at the specified URL.
+ * @see java.awt.Image
+ */
+ Image getImage(URL url);
+
+ /**
+ * Finds and returns the applet in the document represented by this
+ * applet context with the given name. The name can be set in the
+ * HTML tag by setting the <code>name</code> attribute.
+ *
+ * @param name an applet name.
+ * @return the applet with the given name, or <code>null</code> if
+ * not found.
+ */
+ Applet getApplet(String name);
+
+ /**
+ * Finds all the applets in the document represented by this applet
+ * context.
+ *
+ * @return an enumeration of all applets in the document represented by
+ * this applet context.
+ */
+ Enumeration<Applet> getApplets();
+
+ /**
+ * Requests that the browser or applet viewer show the Web page
+ * indicated by the <code>url</code> argument. The browser or
+ * applet viewer determines which window or frame to display the
+ * Web page. This method may be ignored by applet contexts that
+ * are not browsers.
+ *
+ * @param url an absolute URL giving the location of the document.
+ */
+ void showDocument(URL url);...
[truncated message content] |
|
From: <ls...@us...> - 2007-09-08 12:03:28
|
Revision: 3468
http://jnode.svn.sourceforge.net/jnode/?rev=3468&view=rev
Author: lsantha
Date: 2007-09-08 05:03:26 -0700 (Sat, 08 Sep 2007)
Log Message:
-----------
openjdk integration
Added Paths:
-----------
trunk/core/src/openjdk/com/com/sun/jmx/
trunk/core/src/openjdk/com/com/sun/jmx/defaults/
trunk/core/src/openjdk/com/com/sun/jmx/defaults/JmxProperties.java
trunk/core/src/openjdk/com/com/sun/jmx/defaults/ServiceName.java
trunk/core/src/openjdk/com/com/sun/jmx/defaults/package.html
trunk/core/src/openjdk/com/com/sun/jmx/interceptor/
trunk/core/src/openjdk/com/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java
trunk/core/src/openjdk/com/com/sun/jmx/interceptor/MBeanServerInterceptor.java
trunk/core/src/openjdk/com/com/sun/jmx/interceptor/package.html
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/ClassLoaderRepositorySupport.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/ConvertingMethod.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/DescriptorCache.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/DynamicMBean2.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/GetPropertyAction.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/Introspector.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/JmxMBeanServer.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/JmxMBeanServerBuilder.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/MBeanAnalyzer.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/MBeanInstantiator.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/MBeanIntrospector.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/MBeanServerDelegateImpl.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/MBeanSupport.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/MXBeanIntrospector.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/MXBeanLookup.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/MXBeanProxy.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/MXBeanSupport.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/ModifiableClassLoaderRepository.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/NamedObject.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/ObjectInputStreamWithLoader.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/OpenConverter.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/PerInterface.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/Repository.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/SecureClassLoaderRepository.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/StandardMBeanIntrospector.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/StandardMBeanSupport.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/SunJmxMBeanServer.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/Util.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/WeakIdentityHashMap.java
trunk/core/src/openjdk/com/com/sun/jmx/mbeanserver/package.html
trunk/core/src/openjdk/com/com/sun/jmx/remote/
trunk/core/src/openjdk/com/com/sun/jmx/remote/util/
trunk/core/src/openjdk/com/com/sun/jmx/remote/util/CacheMap.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/util/ClassLoaderWithRepository.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/util/ClassLogger.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/util/EnvHelp.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/util/OrderClassLoaders.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/util/Service.java
trunk/core/src/openjdk/com/com/sun/management/
trunk/core/src/openjdk/com/com/sun/management/VMOption.java
trunk/core/src/openjdk/java/java/lang/instrument/
trunk/core/src/openjdk/java/java/lang/instrument/ClassDefinition.java
trunk/core/src/openjdk/java/java/lang/instrument/ClassFileTransformer.java
trunk/core/src/openjdk/java/java/lang/instrument/IllegalClassFormatException.java
trunk/core/src/openjdk/java/java/lang/instrument/Instrumentation.java
trunk/core/src/openjdk/java/java/lang/instrument/UnmodifiableClassException.java
trunk/core/src/openjdk/java/java/lang/instrument/package.html
trunk/core/src/openjdk/java/java/lang/management/
trunk/core/src/openjdk/java/java/lang/management/ClassLoadingMXBean.java
trunk/core/src/openjdk/java/java/lang/management/CompilationMXBean.java
trunk/core/src/openjdk/java/java/lang/management/GarbageCollectorMXBean.java
trunk/core/src/openjdk/java/java/lang/management/LockInfo.java
trunk/core/src/openjdk/java/java/lang/management/ManagementPermission.java
trunk/core/src/openjdk/java/java/lang/management/MemoryMXBean.java
trunk/core/src/openjdk/java/java/lang/management/MemoryManagerMXBean.java
trunk/core/src/openjdk/java/java/lang/management/MemoryNotificationInfo.java
trunk/core/src/openjdk/java/java/lang/management/MemoryPoolMXBean.java
trunk/core/src/openjdk/java/java/lang/management/MemoryType.java
trunk/core/src/openjdk/java/java/lang/management/MonitorInfo.java
trunk/core/src/openjdk/java/java/lang/management/OperatingSystemMXBean.java
trunk/core/src/openjdk/java/java/lang/management/RuntimeMXBean.java
trunk/core/src/openjdk/java/java/lang/management/ThreadMXBean.java
trunk/core/src/openjdk/java/java/lang/reflect/
trunk/core/src/openjdk/java/java/lang/reflect/AnnotatedElement.java
trunk/core/src/openjdk/java/java/lang/reflect/GenericArrayType.java
trunk/core/src/openjdk/java/java/lang/reflect/GenericDeclaration.java
trunk/core/src/openjdk/java/java/lang/reflect/GenericSignatureFormatError.java
trunk/core/src/openjdk/java/java/lang/reflect/InvocationHandler.java
trunk/core/src/openjdk/java/java/lang/reflect/InvocationTargetException.java
trunk/core/src/openjdk/java/java/lang/reflect/MalformedParameterizedTypeException.java
trunk/core/src/openjdk/java/java/lang/reflect/Member.java
trunk/core/src/openjdk/java/java/lang/reflect/ParameterizedType.java
trunk/core/src/openjdk/java/java/lang/reflect/Type.java
trunk/core/src/openjdk/java/java/lang/reflect/TypeVariable.java
trunk/core/src/openjdk/java/java/lang/reflect/UndeclaredThrowableException.java
trunk/core/src/openjdk/java/java/lang/reflect/WildcardType.java
trunk/core/src/openjdk/java/java/lang/reflect/package-info.java
trunk/core/src/openjdk/javax/javax/management/
trunk/core/src/openjdk/javax/javax/management/Descriptor.java
trunk/core/src/openjdk/javax/javax/management/DescriptorKey.java
trunk/core/src/openjdk/javax/javax/management/DescriptorRead.java
trunk/core/src/openjdk/javax/javax/management/ImmutableDescriptor.java
trunk/core/src/openjdk/javax/javax/management/JMX.java
trunk/core/src/openjdk/javax/javax/management/MBeanAttributeInfo.java
trunk/core/src/openjdk/javax/javax/management/MBeanConstructorInfo.java
trunk/core/src/openjdk/javax/javax/management/MBeanFeatureInfo.java
trunk/core/src/openjdk/javax/javax/management/MBeanInfo.java
trunk/core/src/openjdk/javax/javax/management/MBeanNotificationInfo.java
trunk/core/src/openjdk/javax/javax/management/MBeanOperationInfo.java
trunk/core/src/openjdk/javax/javax/management/MBeanParameterInfo.java
trunk/core/src/openjdk/javax/javax/management/MBeanServer.java
trunk/core/src/openjdk/javax/javax/management/MBeanServerConnection.java
trunk/core/src/openjdk/javax/javax/management/MBeanServerDelegate.java
trunk/core/src/openjdk/javax/javax/management/MBeanServerInvocationHandler.java
trunk/core/src/openjdk/javax/javax/management/MXBean.java
trunk/core/src/openjdk/javax/javax/management/NotificationBroadcasterSupport.java
trunk/core/src/openjdk/javax/javax/management/ObjectName.java
trunk/core/src/openjdk/javax/javax/management/StandardEmitterMBean.java
trunk/core/src/openjdk/javax/javax/management/StandardMBean.java
trunk/core/src/openjdk/javax/javax/management/loading/
trunk/core/src/openjdk/javax/javax/management/loading/PrivateClassLoader.java
trunk/core/src/openjdk/javax/javax/management/openmbean/
trunk/core/src/openjdk/javax/javax/management/openmbean/ArrayType.java
trunk/core/src/openjdk/javax/javax/management/openmbean/CompositeDataInvocationHandler.java
trunk/core/src/openjdk/javax/javax/management/openmbean/CompositeDataView.java
trunk/core/src/openjdk/javax/javax/management/openmbean/CompositeType.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanAttributeInfo.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanConstructorInfoSupport.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanOperationInfoSupport.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanParameterInfo.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanParameterInfoSupport.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenType.java
trunk/core/src/openjdk/javax/javax/management/openmbean/SimpleType.java
trunk/core/src/openjdk/javax/javax/management/remote/
trunk/core/src/openjdk/javax/javax/management/remote/JMXConnector.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXConnectorFactory.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXConnectorProvider.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXConnectorServerFactory.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXProviderException.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXServiceURL.java
trunk/core/src/openjdk/sun/sun/management/
trunk/core/src/openjdk/sun/sun/management/LazyCompositeData.java
trunk/core/src/openjdk/sun/sun/management/LockDataConverter.java
trunk/core/src/openjdk/sun/sun/management/LockDataConverterMXBean.java
trunk/core/src/openjdk/sun/sun/management/MappedMXBeanType.java
trunk/core/src/openjdk/sun/sun/management/MemoryNotifInfoCompositeData.java
trunk/core/src/openjdk/sun/sun/management/MemoryUsageCompositeData.java
trunk/core/src/openjdk/sun/sun/management/MonitorInfoCompositeData.java
trunk/core/src/openjdk/sun/sun/management/StackTraceElementCompositeData.java
trunk/core/src/openjdk/sun/sun/management/ThreadInfoCompositeData.java
trunk/core/src/openjdk/sun/sun/management/Util.java
trunk/core/src/openjdk/sun/sun/management/VMOptionCompositeData.java
trunk/core/src/openjdk/vm/java/lang/NativeRuntime.java
trunk/core/src/openjdk/vm/java/lang/NativeSystem.java
Added: trunk/core/src/openjdk/com/com/sun/jmx/defaults/JmxProperties.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/jmx/defaults/JmxProperties.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/jmx/defaults/JmxProperties.java 2007-09-08 12:03:26 UTC (rev 3468)
@@ -0,0 +1,232 @@
+/*
+ * Copyright 1999-2007 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.jmx.defaults;
+
+import java.util.logging.Logger;
+
+/**
+ * This contains the property list defined for this
+ * JMX implementation.
+ *
+ *
+ * @since 1.5
+ */
+public class JmxProperties {
+
+ // private constructor defined to "hide" the default public constructor
+ private JmxProperties() {
+ }
+
+ // PUBLIC STATIC CONSTANTS
+ //------------------------
+
+ /**
+ * References the property that specifies the directory where
+ * the native libraries will be stored before the MLet Service
+ * loads them into memory.
+ * <p>
+ * Property Name: <B>jmx.mlet.library.dir</B>
+ */
+ public static final String JMX_INITIAL_BUILDER =
+ "javax.management.builder.initial";
+
+ /**
+ * References the property that specifies the directory where
+ * the native libraries will be stored before the MLet Service
+ * loads them into memory.
+ * <p>
+ * Property Name: <B>jmx.mlet.library.dir</B>
+ */
+ public static final String MLET_LIB_DIR = "jmx.mlet.library.dir";
+
+ /**
+ * References the property that specifies the full name of the JMX
+ * specification implemented by this product.
+ * <p>
+ * Property Name: <B>jmx.specification.name</B>
+ */
+ public static final String JMX_SPEC_NAME = "jmx.specification.name";
+
+ /**
+ * References the property that specifies the version of the JMX
+ * specification implemented by this product.
+ * <p>
+ * Property Name: <B>jmx.specification.version</B>
+ */
+ public static final String JMX_SPEC_VERSION = "jmx.specification.version";
+
+ /**
+ * References the property that specifies the vendor of the JMX
+ * specification implemented by this product.
+ * <p>
+ * Property Name: <B>jmx.specification.vendor</B>
+ */
+ public static final String JMX_SPEC_VENDOR = "jmx.specification.vendor";
+
+ /**
+ * References the property that specifies the full name of this product
+ * implementing the JMX specification.
+ * <p>
+ * Property Name: <B>jmx.implementation.name</B>
+ */
+ public static final String JMX_IMPL_NAME = "jmx.implementation.name";
+
+ /**
+ * References the property that specifies the name of the vendor of this
+ * product implementing the JMX specification.
+ * <p>
+ * Property Name: <B>jmx.implementation.vendor</B>
+ */
+ public static final String JMX_IMPL_VENDOR = "jmx.implementation.vendor";
+
+ /**
+ * References the property that specifies the version of this product
+ * implementing the JMX specification.
+ * <p>
+ * Property Name: <B>jmx.implementation.version</B>
+ */
+ public static final String JMX_IMPL_VERSION = "jmx.implementation.version";
+
+ /**
+ * Logger name for MBean Server information.
+ */
+ public static final String MBEANSERVER_LOGGER_NAME =
+ "javax.management.mbeanserver";
+
+ /**
+ * Logger for MBean Server information.
+ */
+ public static final Logger MBEANSERVER_LOGGER =
+ Logger.getLogger(MBEANSERVER_LOGGER_NAME);
+
+ /**
+ * Logger name for MLet service information.
+ */
+ public static final String MLET_LOGGER_NAME =
+ "javax.management.mlet";
+
+ /**
+ * Logger for MLet service information.
+ */
+ public static final Logger MLET_LOGGER =
+ Logger.getLogger(MLET_LOGGER_NAME);
+
+ /**
+ * Logger name for Monitor information.
+ */
+ public static final String MONITOR_LOGGER_NAME =
+ "javax.management.monitor";
+
+ /**
+ * Logger for Monitor information.
+ */
+ public static final Logger MONITOR_LOGGER =
+ Logger.getLogger(MONITOR_LOGGER_NAME);
+
+ /**
+ * Logger name for Timer information.
+ */
+ public static final String TIMER_LOGGER_NAME =
+ "javax.management.timer";
+
+ /**
+ * Logger for Timer information.
+ */
+ public static final Logger TIMER_LOGGER =
+ Logger.getLogger(TIMER_LOGGER_NAME);
+
+ /**
+ * Logger name for Event Management information.
+ */
+ public static final String NOTIFICATION_LOGGER_NAME =
+ "javax.management.notification";
+
+ /**
+ * Logger for Event Management information.
+ */
+ public static final Logger NOTIFICATION_LOGGER =
+ Logger.getLogger(NOTIFICATION_LOGGER_NAME);
+
+ /**
+ * Logger name for Relation Service.
+ */
+ public static final String RELATION_LOGGER_NAME =
+ "javax.management.relation";
+
+ /**
+ * Logger for Relation Service.
+ */
+ public static final Logger RELATION_LOGGER =
+ Logger.getLogger(RELATION_LOGGER_NAME);
+
+ /**
+ * Logger name for Model MBean.
+ */
+ public static final String MODELMBEAN_LOGGER_NAME =
+ "javax.management.modelmbean";
+
+ /**
+ * Logger for Model MBean.
+ */
+ public static final Logger MODELMBEAN_LOGGER =
+ Logger.getLogger(MODELMBEAN_LOGGER_NAME);
+
+ /**
+ * Logger name for all other JMX classes.
+ */
+ public static final String MISC_LOGGER_NAME =
+ "javax.management.misc";
+
+ /**
+ * Logger for all other JMX classes.
+ */
+ public static final Logger MISC_LOGGER =
+ Logger.getLogger(MISC_LOGGER_NAME);
+
+ /**
+ * Logger name for SNMP.
+ */
+ public static final String SNMP_LOGGER_NAME =
+ "javax.management.snmp";
+
+ /**
+ * Logger for SNMP.
+ */
+ public static final Logger SNMP_LOGGER =
+ Logger.getLogger(SNMP_LOGGER_NAME);
+
+ /**
+ * Logger name for SNMP Adaptor.
+ */
+ public static final String SNMP_ADAPTOR_LOGGER_NAME =
+ "javax.management.snmp.daemon";
+
+ /**
+ * Logger for SNMP Adaptor.
+ */
+ public static final Logger SNMP_ADAPTOR_LOGGER =
+ Logger.getLogger(SNMP_ADAPTOR_LOGGER_NAME);
+}
Added: trunk/core/src/openjdk/com/com/sun/jmx/defaults/ServiceName.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/jmx/defaults/ServiceName.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/jmx/defaults/ServiceName.java 2007-09-08 12:03:26 UTC (rev 3468)
@@ -0,0 +1,97 @@
+/*
+ * Copyright 1999-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.jmx.defaults;
+
+/**
+ * Used for storing default values used by JMX services.
+ *
+ * @since 1.5
+ */
+public class ServiceName {
+
+ // private constructor defined to "hide" the default public constructor
+ private ServiceName() {
+ }
+
+ /**
+ * The object name of the MBeanServer delegate object
+ * <BR>
+ * The value is <CODE>JMImplementation:type=MBeanServerDelegate</CODE>.
+ */
+ public static final String DELEGATE =
+ "JMImplementation:type=MBeanServerDelegate" ;
+
+ /**
+ * The default key properties for registering the class loader of the
+ * MLet service.
+ * <BR>
+ * The value is <CODE>type=MLet</CODE>.
+ */
+ public static final String MLET = "type=MLet";
+
+ /**
+ * The default domain.
+ * <BR>
+ * The value is <CODE>DefaultDomain</CODE>.
+ */
+ public static final String DOMAIN = "DefaultDomain";
+
+ /**
+ * The name of the JMX specification implemented by this product.
+ * <BR>
+ * The value is <CODE>Java Management Extensions</CODE>.
+ */
+ public static final String JMX_SPEC_NAME = "Java Management Extensions";
+
+ /**
+ * The version of the JMX specification implemented by this product.
+ * <BR>
+ * The value is <CODE>1.4</CODE>.
+ */
+ public static final String JMX_SPEC_VERSION = "1.4";
+
+ /**
+ * The vendor of the JMX specification implemented by this product.
+ * <BR>
+ * The value is <CODE>Sun Microsystems</CODE>.
+ */
+ public static final String JMX_SPEC_VENDOR = "Sun Microsystems";
+
+ /**
+ * The name of this product implementing the JMX specification.
+ * <BR>
+ * The value is <CODE>JMX</CODE>.
+ */
+ public static final String JMX_IMPL_NAME = "JMX";
+
+ /**
+ * The name of the vendor of this product implementing the
+ * JMX specification.
+ * <BR>
+ * The value is <CODE>Sun Microsystems</CODE>.
+ */
+ public static final String JMX_IMPL_VENDOR = "Sun Microsystems";
+}
Added: trunk/core/src/openjdk/com/com/sun/jmx/defaults/package.html
===================================================================
--- trunk/core/src/openjdk/com/com/sun/jmx/defaults/package.html (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/jmx/defaults/package.html 2007-09-08 12:03:26 UTC (rev 3468)
@@ -0,0 +1,33 @@
+<html>
+<head>
+<title>jmx.defaults package</title>
+<!--
+
+Copyright 2002-2003 Sun Microsystems, Inc. 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. Sun designates this
+particular file as subject to the "Classpath" exception as provided
+by Sun in the LICENSE file that accompanied this code.
+
+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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+CA 95054 USA or visit www.sun.com if you need additional information or
+have any questions.
+-->
+</head>
+<body bgcolor="white">
+ Provides specific classes to <B>Sun JMX Reference Implementation</B>.
+</BODY>
+</HTML>
Added: trunk/core/src/openjdk/com/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java 2007-09-08 12:03:26 UTC (rev 3468)
@@ -0,0 +1,1872 @@
+/*
+ * Copyright 2000-2007 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.jmx.interceptor;
+
+// java import
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.WeakHashMap;
+import java.lang.ref.WeakReference;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.security.AccessControlContext;
+import java.security.Permission;
+import java.security.ProtectionDomain;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+// JMX import
+import javax.management.Attribute;
+import javax.management.AttributeList;
+import javax.management.AttributeNotFoundException;
+import javax.management.DynamicMBean;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.InstanceNotFoundException;
+import javax.management.IntrospectionException;
+import javax.management.InvalidAttributeValueException;
+import javax.management.JMException;
+import javax.management.JMRuntimeException;
+import javax.management.ListenerNotFoundException;
+import javax.management.MalformedObjectNameException;
+import javax.management.MBeanException;
+import javax.management.MBeanInfo;
+import javax.management.MBeanPermission;
+import javax.management.MBeanRegistration;
+import javax.management.MBeanRegistrationException;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerDelegate;
+import javax.management.MBeanServerNotification;
+import javax.management.MBeanTrustPermission;
+import javax.management.NotCompliantMBeanException;
+import javax.management.Notification;
+import javax.management.NotificationBroadcaster;
+import javax.management.NotificationEmitter;
+import javax.management.NotificationFilter;
+import javax.management.NotificationListener;
+import javax.management.ObjectInstance;
+import javax.management.ObjectName;
+import javax.management.QueryEval;
+import javax.management.QueryExp;
+import javax.management.ReflectionException;
+import javax.management.RuntimeErrorException;
+import javax.management.RuntimeMBeanException;
+import javax.management.RuntimeOperationsException;
+
+// JMX RI
+import static com.sun.jmx.defaults.JmxProperties.MBEANSERVER_LOGGER;
+import com.sun.jmx.mbeanserver.DynamicMBean2;
+import com.sun.jmx.mbeanserver.ModifiableClassLoaderRepository;
+import com.sun.jmx.mbeanserver.MBeanInstantiator;
+import com.sun.jmx.mbeanserver.MXBeanSupport;
+import com.sun.jmx.mbeanserver.Repository;
+import com.sun.jmx.mbeanserver.NamedObject;
+import com.sun.jmx.defaults.ServiceName;
+import com.sun.jmx.mbeanserver.Introspector;
+import com.sun.jmx.remote.util.EnvHelp;
+
+/**
+ * This is the default class for MBean manipulation on the agent side. It
+ * contains the methods necessary for the creation, registration, and
+ * deletion of MBeans as well as the access methods for registered MBeans.
+ * This is the core component of the JMX infrastructure.
+ * <P>
+ * Every MBean which is added to the MBean server becomes manageable: its attributes and operations
+ * become remotely accessible through the connectors/adaptors connected to that MBean server.
+ * A Java object cannot be registered in the MBean server unless it is a JMX compliant MBean.
+ * <P>
+ * When an MBean is registered or unregistered in the MBean server an
+ * {@link javax.management.MBeanServerNotification MBeanServerNotification}
+ * Notification is emitted. To register an object as listener to MBeanServerNotifications
+ * you should call the MBean server method {@link #addNotificationListener addNotificationListener} with <CODE>ObjectName</CODE>
+ * the <CODE>ObjectName</CODE> of the {@link javax.management.MBeanServerDelegate MBeanServerDelegate}.
+ * This <CODE>ObjectName</CODE> is:
+ * <BR>
+ * <CODE>JMImplementation:type=MBeanServerDelegate</CODE>.
+ *
+ * @since 1.5
+ */
+public class DefaultMBeanServerInterceptor implements MBeanServerInterceptor {
+
+ /** The MBeanInstantiator object used by the
+ * DefaultMBeanServerInterceptor */
+ private final transient MBeanInstantiator instantiator;
+
+ /** The MBean server object that is associated to the
+ * DefaultMBeanServerInterceptor */
+ private transient MBeanServer server = null;
+
+ /** The MBean server object taht associated to the
+ * DefaultMBeanServerInterceptor */
+ private final transient MBeanServerDelegate delegate;
+
+ /** The Repository object used by the DefaultMBeanServerInterceptor */
+ private final transient Repository repository;
+
+ /** Wrappers for client listeners. */
+ /* See the comment before addNotificationListener below. */
+ private final transient
+ WeakHashMap<ListenerWrapper, WeakReference<ListenerW...
[truncated message content] |
|
From: <ls...@us...> - 2007-09-08 16:44:24
|
Revision: 3471
http://jnode.svn.sourceforge.net/jnode/?rev=3471&view=rev
Author: lsantha
Date: 2007-09-08 09:44:21 -0700 (Sat, 08 Sep 2007)
Log Message:
-----------
openjdk integration
Added Paths:
-----------
trunk/core/src/openjdk/javax/javax/management/ValueExp.java
trunk/core/src/openjdk/sun/sun/management/AgentConfigurationError.java
trunk/core/src/openjdk/sun/sun/management/ClassLoadingImpl.java
trunk/core/src/openjdk/sun/sun/management/CompilationImpl.java
trunk/core/src/openjdk/sun/sun/management/CompilerThreadStat.java
Added: trunk/core/src/openjdk/javax/javax/management/ValueExp.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/management/ValueExp.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/management/ValueExp.java 2007-09-08 16:44:21 UTC (rev 3471)
@@ -0,0 +1,103 @@
+/*
+ * Copyright 1999-2004 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.management;
+
+
+/**
+ * Represents values that can be passed as arguments to
+ * relational expressions. Strings, numbers, attributes are valid values
+ * and should be represented by implementations of <CODE>ValueExp</CODE>.
+ *
+ * @since 1.5
+ */
+/*
+ We considered generifying this interface as ValueExp<T>, where T is
+ the Java type that this expression generates. This allows some additional
+ checking in the various methods of the Query class, but in practice
+ not much. Typically you have something like
+ Query.lt(Query.attr("A"), Query.value(5)). We can arrange for Query.value
+ to have type ValueExp<Integer> (or maybe ValueExp<Long> or ValueExp<Number>)
+ but for Query.attr we can't do better than ValueExp<?> or plain ValueExp.
+ So even though we could define Query.lt as:
+ QueryExp <T> lt(ValueExp<T> v1, ValueExp<T> v2)
+ and thus prevent comparing a
+ number against a string, in practice the first ValueExp will almost always
+ be a Query.attr so this check serves no purpose. You would have to
+ write Query.<Number>attr("A"), for example, which would be awful. And,
+ if you wrote Query.<Integer>attr("A") you would then discover that you
+ couldn't compare it against Query.value(5) if the latter is defined as
+ ValueExp<Number>, or against Query.value(5L) if it is defined as
+ ValueExp<Integer>.
+
+ Worse, for Query.in we would like to define:
+ QueryExp <T> in(ValueExp<T> val, ValueExp<T>[] valueList)
+ but this is unusable because you cannot write
+ "new ValueExp<Integer>[] {...}" (the compiler forbids it).
+
+ The few mistakes you might catch with this generification certainly
+ wouldn't justify the hassle of modifying user code to get the checks
+ to be made and the "unchecked" warnings that would arise if it
+ wasn't so modified.
+
+ We could reconsider this if the Query methods were augmented, for example
+ with:
+ AttributeValueExp<Number> numberAttr(String name);
+ AttributeValueExp<String> stringAttr(String name);
+ AttributeValueExp<Boolean> booleanAttr(String name);
+ QueryExp <T> in(ValueExp<T> val, Set<ValueExp<T>> valueSet).
+ But it's not really clear what numberAttr should do if it finds that the
+ attribute is not in fact a Number.
+ */
+public interface ValueExp extends java.io.Serializable {
+
+ /**
+ * Applies the ValueExp on a MBean.
+ *
+ * @param name The name of the MBean on which the ValueExp will be applied.
+ *
+ * @return The <CODE>ValueExp</CODE>.
+ *
+ * @exception BadStringOperationException
+ * @exception BadBinaryOpValueExpException
+ * @exception BadAttributeValueExpException
+ * @exception InvalidApplicationException
+ */
+ public ValueExp apply(ObjectName name)
+ throws BadStringOperationException, BadBinaryOpValueExpException,
+ BadAttributeValueExpException, InvalidApplicationException;
+
+ /**
+ * Sets the MBean server on which the query is to be performed.
+ *
+ * @param s The MBean server on which the query is to be performed.
+ *
+ * @deprecated This method is not needed because a
+ * <code>ValueExp</code> can access the MBean server in which it
+ * is being evaluated by using {@link QueryEval#getMBeanServer()}.
+ */
+ @Deprecated
+ public void setMBeanServer(MBeanServer s) ;
+}
Added: trunk/core/src/openjdk/sun/sun/management/AgentConfigurationError.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/management/AgentConfigurationError.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/management/AgentConfigurationError.java 2007-09-08 16:44:21 UTC (rev 3471)
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2004-2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.management;
+
+/**
+ * Configuration Error thrown by a management agent.
+ */
+public class AgentConfigurationError extends Error {
+ public static final String AGENT_EXCEPTION =
+ "agent.err.exception";
+ public static final String CONFIG_FILE_NOT_FOUND =
+ "agent.err.configfile.notfound";
+ public static final String CONFIG_FILE_OPEN_FAILED =
+ "agent.err.configfile.failed";
+ public static final String CONFIG_FILE_CLOSE_FAILED =
+ "agent.err.configfile.closed.failed";
+ public static final String CONFIG_FILE_ACCESS_DENIED =
+ "agent.err.configfile.access.denied";
+ public static final String EXPORT_ADDRESS_FAILED =
+ "agent.err.exportaddress.failed";
+ public static final String AGENT_CLASS_NOT_FOUND =
+ "agent.err.agentclass.notfound";
+ public static final String AGENT_CLASS_FAILED =
+ "agent.err.agentclass.failed";
+ public static final String AGENT_CLASS_PREMAIN_NOT_FOUND =
+ "agent.err.premain.notfound";
+ public static final String AGENT_CLASS_ACCESS_DENIED =
+ "agent.err.agentclass.access.denied";
+ public static final String AGENT_CLASS_INVALID =
+ "agent.err.invalid.agentclass";
+ public static final String INVALID_JMXREMOTE_PORT =
+ "agent.err.invalid.jmxremote.port";
+ public static final String PASSWORD_FILE_NOT_SET =
+ "agent.err.password.file.notset";
+ public static final String PASSWORD_FILE_NOT_READABLE =
+ "agent.err.password.file.not.readable";
+ public static final String PASSWORD_FILE_READ_FAILED =
+ "agent.err.password.file.read.failed";
+ public static final String PASSWORD_FILE_NOT_FOUND =
+ "agent.err.password.file.notfound";
+ public static final String ACCESS_FILE_NOT_SET =
+ "agent.err.access.file.notset";
+ public static final String ACCESS_FILE_NOT_READABLE =
+ "agent.err.access.file.not.readable";
+ public static final String ACCESS_FILE_READ_FAILED =
+ "agent.err.access.file.read.failed";
+ public static final String ACCESS_FILE_NOT_FOUND =
+ "agent.err.access.file.notfound";
+ public static final String PASSWORD_FILE_ACCESS_NOT_RESTRICTED =
+ "agent.err.password.file.access.notrestricted";
+ public static final String CONNECTOR_SERVER_IO_ERROR =
+ "agent.err.connector.server.io.error";
+ public static final String INVALID_OPTION =
+ "agent.err.invalid.option";
+ public static final String INVALID_SNMP_PORT =
+ "agent.err.invalid.snmp.port";
+ public static final String INVALID_SNMP_TRAP_PORT =
+ "agent.err.invalid.snmp.trap.port";
+ public static final String UNKNOWN_SNMP_INTERFACE =
+ "agent.err.unknown.snmp.interface";
+ public static final String SNMP_ACL_FILE_NOT_SET =
+ "agent.err.acl.file.notset";
+ public static final String SNMP_ACL_FILE_NOT_FOUND =
+ "agent.err.acl.file.notfound";
+ public static final String SNMP_ACL_FILE_NOT_READABLE =
+ "agent.err.acl.file.not.readable";
+ public static final String SNMP_ACL_FILE_READ_FAILED =
+ "agent.err.acl.file.read.failed";
+ public static final String SNMP_ACL_FILE_ACCESS_NOT_RESTRICTED =
+ "agent.err.acl.file.access.notrestricted";
+ public static final String SNMP_ADAPTOR_START_FAILED =
+ "agent.err.snmp.adaptor.start.failed";
+ public static final String SNMP_MIB_INIT_FAILED =
+ "agent.err.snmp.mib.init.failed";
+
+ private final String error;
+ private final String[] params;
+
+ public AgentConfigurationError(String error) {
+ super();
+ this.error = error;
+ this.params = null;
+ }
+
+ public AgentConfigurationError(String error, Throwable cause) {
+ super(cause);
+ this.error = error;
+ this.params = null;
+ }
+
+ public AgentConfigurationError(String error, String... params) {
+ super();
+ this.error = error;
+ this.params = new String[params.length];
+ for (int i = 0; i < params.length; i++) {
+ this.params[i] = params[i];
+ }
+ }
+
+ public AgentConfigurationError(String error, Throwable cause, String... params) {
+ super(cause);
+ this.error = error;
+ this.params = new String[params.length];
+ for (int i = 0; i < params.length; i++) {
+ this.params[i] = params[i];
+ }
+ }
+
+ public String getError() {
+ return error;
+ }
+
+ public String[] getParams() {
+ return params;
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/management/ClassLoadingImpl.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/management/ClassLoadingImpl.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/management/ClassLoadingImpl.java 2007-09-08 16:44:21 UTC (rev 3471)
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2003-2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.management;
+
+import java.lang.management.ClassLoadingMXBean;
+
+/**
+ * Implementation class for the class loading subsystem.
+ * Standard and committed hotspot-specific metrics if any.
+ *
+ * ManagementFactory.getClassLoadingMXBean() returns an instance
+ * of this class.
+ */
+class ClassLoadingImpl implements ClassLoadingMXBean {
+
+ private final VMManagement jvm;
+
+ /**
+ * Constructor of ClassLoadingImpl class.
+ */
+ ClassLoadingImpl(VMManagement vm) {
+ this.jvm = vm;
+ }
+
+ public long getTotalLoadedClassCount() {
+ return jvm.getTotalClassCount();
+ }
+
+ public int getLoadedClassCount() {
+ return jvm.getLoadedClassCount();
+ }
+
+ public long getUnloadedClassCount() {
+ return jvm.getUnloadedClassCount();
+ }
+
+ public boolean isVerbose() {
+ return jvm.getVerboseClass();
+ }
+
+ public void setVerbose(boolean value) {
+ ManagementFactory.checkControlAccess();
+
+ setVerboseClass(value);
+ }
+ native static void setVerboseClass(boolean value);
+}
Added: trunk/core/src/openjdk/sun/sun/management/CompilationImpl.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/management/CompilationImpl.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/management/CompilationImpl.java 2007-09-08 16:44:21 UTC (rev 3471)
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2003-2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.management;
+
+import java.lang.management.CompilationMXBean;
+
+/**
+ * Implementation class for the compilation subsystem.
+ * Standard and committed hotspot-specific metrics if any.
+ *
+ * ManagementFactory.getCompilationMXBean() returns an instance
+ * of this class.
+ */
+class CompilationImpl implements CompilationMXBean {
+
+ private final VMManagement jvm;
+ private final String name;
+
+ /**
+ * Constructor of CompilationImpl class.
+ */
+ CompilationImpl(VMManagement vm) {
+ this.jvm = vm;
+ this.name = jvm.getCompilerName();
+ if (name == null) {
+ throw new InternalError("Null compiler name");
+ }
+ }
+
+ public java.lang.String getName() {
+ return name;
+ }
+
+ public boolean isCompilationTimeMonitoringSupported() {
+ return jvm.isCompilationTimeMonitoringSupported();
+ }
+
+ public long getTotalCompilationTime() {
+ if (!isCompilationTimeMonitoringSupported()) {
+ throw new UnsupportedOperationException(
+ "Compilation time monitoring is not supported.");
+ }
+
+ return jvm.getTotalCompileTime();
+ }
+
+}
Added: trunk/core/src/openjdk/sun/sun/management/CompilerThreadStat.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/management/CompilerThreadStat.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/management/CompilerThreadStat.java 2007-09-08 16:44:21 UTC (rev 3471)
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2003 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.management;
+
+/**
+ */
+public class CompilerThreadStat implements java.io.Serializable {
+ private String name;
+ private long taskCount;
+ private long compileTime;
+ private MethodInfo lastMethod;
+
+ CompilerThreadStat(String name, long taskCount, long time, MethodInfo lastMethod) {
+ this.name = name;
+ this.taskCount = taskCount;
+ this.compileTime = time;
+ this.lastMethod = lastMethod;
+ };
+
+ /**
+ * Returns the name of the compiler thread associated with
+ * this compiler thread statistic.
+ *
+ * @return the name of the compiler thread.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Returns the number of compile tasks performed by the compiler thread
+ * associated with this compiler thread statistic.
+ *
+ * @return the number of compile tasks performed by the compiler thread.
+ */
+ public long getCompileTaskCount() {
+ return taskCount;
+ }
+
+ /**
+ * Returns the accumulated elapsed time spent by the compiler thread
+ * associated with this compiler thread statistic.
+ *
+ * @return the accumulated elapsed time spent by the compiler thread.
+ */
+ public long getCompileTime() {
+ return compileTime;
+ }
+
+ /**
+ * Returns the information about the last method compiled by
+ * the compiler thread associated with this compiler thread statistic.
+ *
+ * @return a {@link MethodInfo} object for the last method
+ * compiled by the compiler thread.
+ */
+ public MethodInfo getLastCompiledMethodInfo() {
+ return lastMethod;
+ }
+
+ public String toString() {
+ return getName() + " compileTasks = " + getCompileTaskCount()
+ + " compileTime = " + getCompileTime();
+ }
+
+ private static final long serialVersionUID = 6992337162326171013L;
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2007-09-08 16:47:37
|
Revision: 3472
http://jnode.svn.sourceforge.net/jnode/?rev=3472&view=rev
Author: lsantha
Date: 2007-09-08 09:47:35 -0700 (Sat, 08 Sep 2007)
Log Message:
-----------
openjdk integration
Added Paths:
-----------
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ArrayNotificationBuffer.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ArrayQueue.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ClientCommunicatorAdmin.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ClientListenerInfo.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ClientNotifForwarder.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/NotificationBuffer.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/NotificationBufferFilter.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ProxyInputStream.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ProxyRef.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/RMIExporter.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ServerCommunicatorAdmin.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ServerNotifForwarder.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/Unmarshal.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/package.html
trunk/core/src/openjdk/com/com/sun/jmx/remote/security/
trunk/core/src/openjdk/com/com/sun/jmx/remote/security/FileLoginModule.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/security/JMXPluggableAuthenticator.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/security/JMXSubjectDomainCombiner.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/security/MBeanServerAccessController.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/security/MBeanServerFileAccessController.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/security/NotificationAccessController.java
trunk/core/src/openjdk/com/com/sun/jmx/remote/security/SubjectDelegator.java
trunk/core/src/openjdk/com/com/sun/management/GarbageCollectorMXBean.java
trunk/core/src/openjdk/com/com/sun/management/GcInfo.java
trunk/core/src/openjdk/com/com/sun/management/HotSpotDiagnosticMXBean.java
trunk/core/src/openjdk/com/com/sun/management/OSMBeanFactory.java
trunk/core/src/openjdk/com/com/sun/management/OperatingSystemMXBean.java
trunk/core/src/openjdk/com/com/sun/management/UnixOperatingSystem.java
trunk/core/src/openjdk/com/com/sun/management/UnixOperatingSystemMXBean.java
trunk/core/src/openjdk/com/com/sun/management/mgmt-overview.html
trunk/core/src/openjdk/com/com/sun/management/package.html
trunk/core/src/openjdk/java/java/lang/management/ManagementFactory.java
trunk/core/src/openjdk/java/java/lang/management/MemoryUsage.java
trunk/core/src/openjdk/java/java/lang/management/ThreadInfo.java
trunk/core/src/openjdk/java/java/lang/management/package.html
trunk/core/src/openjdk/javax/javax/management/AndQueryExp.java
trunk/core/src/openjdk/javax/javax/management/Attribute.java
trunk/core/src/openjdk/javax/javax/management/AttributeChangeNotification.java
trunk/core/src/openjdk/javax/javax/management/AttributeChangeNotificationFilter.java
trunk/core/src/openjdk/javax/javax/management/AttributeList.java
trunk/core/src/openjdk/javax/javax/management/AttributeNotFoundException.java
trunk/core/src/openjdk/javax/javax/management/AttributeValueExp.java
trunk/core/src/openjdk/javax/javax/management/BadAttributeValueExpException.java
trunk/core/src/openjdk/javax/javax/management/BadBinaryOpValueExpException.java
trunk/core/src/openjdk/javax/javax/management/BadStringOperationException.java
trunk/core/src/openjdk/javax/javax/management/BetweenQueryExp.java
trunk/core/src/openjdk/javax/javax/management/BinaryOpValueExp.java
trunk/core/src/openjdk/javax/javax/management/BinaryRelQueryExp.java
trunk/core/src/openjdk/javax/javax/management/BooleanValueExp.java
trunk/core/src/openjdk/javax/javax/management/ClassAttributeValueExp.java
trunk/core/src/openjdk/javax/javax/management/DefaultLoaderRepository.java
trunk/core/src/openjdk/javax/javax/management/DescriptorAccess.java
trunk/core/src/openjdk/javax/javax/management/DynamicMBean.java
trunk/core/src/openjdk/javax/javax/management/InQueryExp.java
trunk/core/src/openjdk/javax/javax/management/InstanceAlreadyExistsException.java
trunk/core/src/openjdk/javax/javax/management/InstanceNotFoundException.java
trunk/core/src/openjdk/javax/javax/management/InstanceOfQueryExp.java
trunk/core/src/openjdk/javax/javax/management/IntrospectionException.java
trunk/core/src/openjdk/javax/javax/management/InvalidApplicationException.java
trunk/core/src/openjdk/javax/javax/management/InvalidAttributeValueException.java
trunk/core/src/openjdk/javax/javax/management/JMException.java
trunk/core/src/openjdk/javax/javax/management/JMRuntimeException.java
trunk/core/src/openjdk/javax/javax/management/ListenerNotFoundException.java
trunk/core/src/openjdk/javax/javax/management/MBeanException.java
trunk/core/src/openjdk/javax/javax/management/MBeanPermission.java
trunk/core/src/openjdk/javax/javax/management/MBeanRegistration.java
trunk/core/src/openjdk/javax/javax/management/MBeanRegistrationException.java
trunk/core/src/openjdk/javax/javax/management/MBeanServerBuilder.java
trunk/core/src/openjdk/javax/javax/management/MBeanServerDelegateMBean.java
trunk/core/src/openjdk/javax/javax/management/MBeanServerFactory.java
trunk/core/src/openjdk/javax/javax/management/MBeanServerNotification.java
trunk/core/src/openjdk/javax/javax/management/MBeanServerPermission.java
trunk/core/src/openjdk/javax/javax/management/MBeanTrustPermission.java
trunk/core/src/openjdk/javax/javax/management/MalformedObjectNameException.java
trunk/core/src/openjdk/javax/javax/management/MatchQueryExp.java
trunk/core/src/openjdk/javax/javax/management/NotCompliantMBeanException.java
trunk/core/src/openjdk/javax/javax/management/NotQueryExp.java
trunk/core/src/openjdk/javax/javax/management/Notification.java
trunk/core/src/openjdk/javax/javax/management/NotificationBroadcaster.java
trunk/core/src/openjdk/javax/javax/management/NotificationEmitter.java
trunk/core/src/openjdk/javax/javax/management/NotificationFilter.java
trunk/core/src/openjdk/javax/javax/management/NotificationFilterSupport.java
trunk/core/src/openjdk/javax/javax/management/NotificationListener.java
trunk/core/src/openjdk/javax/javax/management/NumericValueExp.java
trunk/core/src/openjdk/javax/javax/management/ObjectInstance.java
trunk/core/src/openjdk/javax/javax/management/OperationsException.java
trunk/core/src/openjdk/javax/javax/management/OrQueryExp.java
trunk/core/src/openjdk/javax/javax/management/PersistentMBean.java
trunk/core/src/openjdk/javax/javax/management/QualifiedAttributeValueExp.java
trunk/core/src/openjdk/javax/javax/management/Query.java
trunk/core/src/openjdk/javax/javax/management/QueryEval.java
trunk/core/src/openjdk/javax/javax/management/QueryExp.java
trunk/core/src/openjdk/javax/javax/management/ReflectionException.java
trunk/core/src/openjdk/javax/javax/management/RuntimeErrorException.java
trunk/core/src/openjdk/javax/javax/management/RuntimeMBeanException.java
trunk/core/src/openjdk/javax/javax/management/RuntimeOperationsException.java
trunk/core/src/openjdk/javax/javax/management/ServiceNotFoundException.java
trunk/core/src/openjdk/javax/javax/management/StringValueExp.java
trunk/core/src/openjdk/javax/javax/management/build.xml
trunk/core/src/openjdk/javax/javax/management/loading/ClassLoaderRepository.java
trunk/core/src/openjdk/javax/javax/management/loading/DefaultLoaderRepository.java
trunk/core/src/openjdk/javax/javax/management/loading/MLet.java
trunk/core/src/openjdk/javax/javax/management/loading/MLetContent.java
trunk/core/src/openjdk/javax/javax/management/loading/MLetMBean.java
trunk/core/src/openjdk/javax/javax/management/loading/MLetObjectInputStream.java
trunk/core/src/openjdk/javax/javax/management/loading/MLetParser.java
trunk/core/src/openjdk/javax/javax/management/loading/PrivateMLet.java
trunk/core/src/openjdk/javax/javax/management/loading/package.html
trunk/core/src/openjdk/javax/javax/management/modelmbean/
trunk/core/src/openjdk/javax/javax/management/modelmbean/DescriptorSupport.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/InvalidTargetObjectTypeException.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/ModelMBean.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/ModelMBeanAttributeInfo.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/ModelMBeanConstructorInfo.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/ModelMBeanInfo.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/ModelMBeanInfoSupport.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/ModelMBeanNotificationBroadcaster.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/ModelMBeanNotificationInfo.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/ModelMBeanOperationInfo.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/RequiredModelMBean.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/XMLParseException.java
trunk/core/src/openjdk/javax/javax/management/modelmbean/package.html
trunk/core/src/openjdk/javax/javax/management/monitor/
trunk/core/src/openjdk/javax/javax/management/monitor/CounterMonitor.java
trunk/core/src/openjdk/javax/javax/management/monitor/CounterMonitorMBean.java
trunk/core/src/openjdk/javax/javax/management/monitor/GaugeMonitor.java
trunk/core/src/openjdk/javax/javax/management/monitor/GaugeMonitorMBean.java
trunk/core/src/openjdk/javax/javax/management/monitor/Monitor.java
trunk/core/src/openjdk/javax/javax/management/monitor/MonitorMBean.java
trunk/core/src/openjdk/javax/javax/management/monitor/MonitorNotification.java
trunk/core/src/openjdk/javax/javax/management/monitor/MonitorSettingException.java
trunk/core/src/openjdk/javax/javax/management/monitor/StringMonitor.java
trunk/core/src/openjdk/javax/javax/management/monitor/StringMonitorMBean.java
trunk/core/src/openjdk/javax/javax/management/monitor/package.html
trunk/core/src/openjdk/javax/javax/management/openmbean/CompositeData.java
trunk/core/src/openjdk/javax/javax/management/openmbean/CompositeDataSupport.java
trunk/core/src/openjdk/javax/javax/management/openmbean/InvalidKeyException.java
trunk/core/src/openjdk/javax/javax/management/openmbean/InvalidOpenTypeException.java
trunk/core/src/openjdk/javax/javax/management/openmbean/KeyAlreadyExistsException.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenDataException.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanConstructorInfo.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanInfo.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanInfoSupport.java
trunk/core/src/openjdk/javax/javax/management/openmbean/OpenMBeanOperationInfo.java
trunk/core/src/openjdk/javax/javax/management/openmbean/TabularData.java
trunk/core/src/openjdk/javax/javax/management/openmbean/TabularDataSupport.java
trunk/core/src/openjdk/javax/javax/management/openmbean/TabularType.java
trunk/core/src/openjdk/javax/javax/management/openmbean/package.html
trunk/core/src/openjdk/javax/javax/management/package.html
trunk/core/src/openjdk/javax/javax/management/relation/
trunk/core/src/openjdk/javax/javax/management/relation/InvalidRelationIdException.java
trunk/core/src/openjdk/javax/javax/management/relation/InvalidRelationServiceException.java
trunk/core/src/openjdk/javax/javax/management/relation/InvalidRelationTypeException.java
trunk/core/src/openjdk/javax/javax/management/relation/InvalidRoleInfoException.java
trunk/core/src/openjdk/javax/javax/management/relation/InvalidRoleValueException.java
trunk/core/src/openjdk/javax/javax/management/relation/MBeanServerNotificationFilter.java
trunk/core/src/openjdk/javax/javax/management/relation/Relation.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationException.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationNotFoundException.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationNotification.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationService.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationServiceMBean.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationServiceNotRegisteredException.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationSupport.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationSupportMBean.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationType.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationTypeNotFoundException.java
trunk/core/src/openjdk/javax/javax/management/relation/RelationTypeSupport.java
trunk/core/src/openjdk/javax/javax/management/relation/Role.java
trunk/core/src/openjdk/javax/javax/management/relation/RoleInfo.java
trunk/core/src/openjdk/javax/javax/management/relation/RoleInfoNotFoundException.java
trunk/core/src/openjdk/javax/javax/management/relation/RoleList.java
trunk/core/src/openjdk/javax/javax/management/relation/RoleNotFoundException.java
trunk/core/src/openjdk/javax/javax/management/relation/RoleResult.java
trunk/core/src/openjdk/javax/javax/management/relation/RoleStatus.java
trunk/core/src/openjdk/javax/javax/management/relation/RoleUnresolved.java
trunk/core/src/openjdk/javax/javax/management/relation/RoleUnresolvedList.java
trunk/core/src/openjdk/javax/javax/management/relation/package.html
trunk/core/src/openjdk/javax/javax/management/remote/JMXAddressable.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXAuthenticator.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXConnectionNotification.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXConnectorServer.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXConnectorServerMBean.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXConnectorServerProvider.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXPrincipal.java
trunk/core/src/openjdk/javax/javax/management/remote/JMXServerErrorException.java
trunk/core/src/openjdk/javax/javax/management/remote/MBeanServerForwarder.java
trunk/core/src/openjdk/javax/javax/management/remote/NotificationResult.java
trunk/core/src/openjdk/javax/javax/management/remote/SubjectDelegationPermission.java
trunk/core/src/openjdk/javax/javax/management/remote/TargetedNotification.java
trunk/core/src/openjdk/javax/javax/management/remote/package.html
trunk/core/src/openjdk/javax/javax/management/remote/rmi/
trunk/core/src/openjdk/javax/javax/management/remote/rmi/NoCallStackClassLoader.java
trunk/core/src/openjdk/javax/javax/management/remote/rmi/RMIConnection.java
trunk/core/src/openjdk/javax/javax/management/remote/rmi/RMIConnectionImpl.java
trunk/core/src/openjdk/javax/javax/management/remote/rmi/RMIConnector.java
trunk/core/src/openjdk/javax/javax/management/remote/rmi/RMIConnectorServer.java
trunk/core/src/openjdk/javax/javax/management/remote/rmi/RMIIIOPServerImpl.java
trunk/core/src/openjdk/javax/javax/management/remote/rmi/RMIJRMPServerImpl.java
trunk/core/src/openjdk/javax/javax/management/remote/rmi/RMIServer.java
trunk/core/src/openjdk/javax/javax/management/remote/rmi/RMIServerImpl.java
trunk/core/src/openjdk/javax/javax/management/remote/rmi/package.html
trunk/core/src/openjdk/javax/javax/management/timer/
trunk/core/src/openjdk/javax/javax/management/timer/Timer.java
trunk/core/src/openjdk/javax/javax/management/timer/TimerAlarmClockNotification.java
trunk/core/src/openjdk/javax/javax/management/timer/TimerMBean.java
trunk/core/src/openjdk/javax/javax/management/timer/TimerNotification.java
trunk/core/src/openjdk/javax/javax/management/timer/package.html
trunk/core/src/openjdk/sun/sun/management/FileSystem.java
trunk/core/src/openjdk/sun/sun/management/FileSystemImpl.java
trunk/core/src/openjdk/sun/sun/management/Flag.java
trunk/core/src/openjdk/sun/sun/management/GarbageCollectorImpl.java
trunk/core/src/openjdk/sun/sun/management/GcInfoBuilder.java
trunk/core/src/openjdk/sun/sun/management/GcInfoCompositeData.java
trunk/core/src/openjdk/sun/sun/management/HotSpotDiagnostic.java
trunk/core/src/openjdk/sun/sun/management/HotspotClassLoading.java
trunk/core/src/openjdk/sun/sun/management/HotspotClassLoadingMBean.java
trunk/core/src/openjdk/sun/sun/management/HotspotCompilation.java
trunk/core/src/openjdk/sun/sun/management/HotspotCompilationMBean.java
trunk/core/src/openjdk/sun/sun/management/HotspotMemory.java
trunk/core/src/openjdk/sun/sun/management/HotspotMemoryMBean.java
trunk/core/src/openjdk/sun/sun/management/HotspotRuntime.java
trunk/core/src/openjdk/sun/sun/management/HotspotRuntimeMBean.java
trunk/core/src/openjdk/sun/sun/management/HotspotThread.java
trunk/core/src/openjdk/sun/sun/management/HotspotThreadMBean.java
trunk/core/src/openjdk/sun/sun/management/ManagementFactory.java
trunk/core/src/openjdk/sun/sun/management/MemoryImpl.java
trunk/core/src/openjdk/sun/sun/management/MemoryManagerImpl.java
trunk/core/src/openjdk/sun/sun/management/MemoryPoolImpl.java
trunk/core/src/openjdk/sun/sun/management/MethodInfo.java
trunk/core/src/openjdk/sun/sun/management/NotificationEmitterSupport.java
trunk/core/src/openjdk/sun/sun/management/OperatingSystemImpl.java
trunk/core/src/openjdk/sun/sun/management/RuntimeImpl.java
trunk/core/src/openjdk/sun/sun/management/Sensor.java
trunk/core/src/openjdk/sun/sun/management/ThreadImpl.java
trunk/core/src/openjdk/sun/sun/management/VMManagement.java
trunk/core/src/openjdk/sun/sun/management/VMManagementImpl.java
trunk/core/src/openjdk/sun/sun/management/counter/
trunk/core/src/openjdk/sun/sun/management/counter/AbstractCounter.java
trunk/core/src/openjdk/sun/sun/management/counter/ByteArrayCounter.java
trunk/core/src/openjdk/sun/sun/management/counter/Counter.java
trunk/core/src/openjdk/sun/sun/management/counter/LongArrayCounter.java
trunk/core/src/openjdk/sun/sun/management/counter/LongCounter.java
trunk/core/src/openjdk/sun/sun/management/counter/StringCounter.java
trunk/core/src/openjdk/sun/sun/management/counter/Units.java
trunk/core/src/openjdk/sun/sun/management/counter/Variability.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/
trunk/core/src/openjdk/sun/sun/management/counter/perf/ByteArrayCounterSnapshot.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/InstrumentationException.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/LongArrayCounterSnapshot.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/LongCounterSnapshot.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/PerfByteArrayCounter.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/PerfDataEntry.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/PerfDataType.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/PerfInstrumentation.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/PerfLongArrayCounter.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/PerfLongCounter.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/PerfStringCounter.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/Prologue.java
trunk/core/src/openjdk/sun/sun/management/counter/perf/StringCounterSnapshot.java
trunk/core/src/openjdk/sun/sun/management/jmxremote/
trunk/core/src/openjdk/sun/sun/management/jmxremote/SingleEntryRegistry.java
trunk/core/src/openjdk/sun/sun/management/jmxremote/package.html
Added: trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ArrayNotificationBuffer.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ArrayNotificationBuffer.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/jmx/remote/internal/ArrayNotificationBuffer.java 2007-09-08 16:47:35 UTC (rev 3472)
@@ -0,0 +1,754 @@
+/*
+ * Copyright 2003-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.jmx.remote.internal;
+
+import java.io.IOException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.ListenerNotFoundException;
+import javax.management.MalformedObjectNameException;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerDelegate;
+import javax.management.MBeanServerNotification;
+import javax.management.Notification;
+import javax.management.NotificationBroadcaster;
+import javax.management.NotificationFilter;
+import javax.management.NotificationFilterSupport;
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
+import javax.management.QueryEval;
+import javax.management.QueryExp;
+
+import javax.management.remote.NotificationResult;
+import javax.management.remote.TargetedNotification;
+
+import com.sun.jmx.remote.util.EnvHelp;
+import com.sun.jmx.remote.util.ClassLogger;
+
+/** A circular buffer of notifications received from an MBean server. */
+public class ArrayNotificationBuffer implements NotificationBuffer {
+
+ private boolean disposed = false;
+
+ // FACTORY STUFF, INCLUDING SHARING
+
+ private static final
+ HashMap<MBeanServer,ArrayNotificationBuffer> mbsToBuffer =
+ new HashMap<MBeanServer,ArrayNotificationBuffer>(1);
+ private final Collection<ShareBuffer> sharers = new HashSet<ShareBuffer>(1);
+
+ public static synchronized NotificationBuffer
+ getNotificationBuffer(MBeanServer mbs, Map env) {
+
+ //Find out queue size
+ int queueSize = EnvHelp.getNotifBufferSize(env);
+
+ ArrayNotificationBuffer buf = mbsToBuffer.get(mbs);
+ if (buf == null) {
+ buf = new ArrayNotificationBuffer(mbs, queueSize);
+ mbsToBuffer.put(mbs, buf);
+ }
+ return buf.new ShareBuffer(queueSize);
+ }
+
+ public static synchronized void removeNotificationBuffer(MBeanServer mbs) {
+ mbsToBuffer.remove(mbs);
+ }
+
+ synchronized void addSharer(ShareBuffer sharer) {
+ if (sharer.getSize() > queueSize)
+ resize(sharer.getSize());
+ sharers.add(sharer);
+ }
+
+ void removeSharer(ShareBuffer sharer) {
+ boolean empty;
+ synchronized (this) {
+ sharers.remove(sharer);
+ empty = sharers.isEmpty();
+ if (!empty) {
+ int max = 0;
+ for (ShareBuffer buf : sharers) {
+ int bufsize = buf.getSize();
+ if (bufsize > max)
+ max = bufsize;
+ }
+ if (max < queueSize)
+ resize(max);
+ }
+ }
+ if (empty)
+ dispose();
+ }
+
+ private void resize(int newSize) {
+ if (newSize == queueSize)
+ return;
+ while (queue.size() > newSize)
+ dropNotification();
+ queue.resize(newSize);
+ queueSize = newSize;
+ }
+
+ private class ShareBuffer implements NotificationBuffer {
+ ShareBuffer(int size) {
+ this.size = size;
+ addSharer(this);
+ }
+
+ public NotificationResult
+ fetchNotifications(NotificationBufferFilter filter,
+ long startSequenceNumber,
+ long timeout,
+ int maxNotifications)
+ throws InterruptedException {
+ NotificationBuffer buf = ArrayNotificationBuffer.this;
+ return buf.fetchNotifications(filter, startSequenceNumber,
+ timeout, maxNotifications);
+ }
+
+ public void dispose() {
+ ArrayNotificationBuffer.this.removeSharer(this);
+ }
+
+ int getSize() {
+ return size;
+ }
+
+ private final int size;
+ }
+
+
+ // ARRAYNOTIFICATIONBUFFER IMPLEMENTATION
+
+ private ArrayNotificationBuffer(MBeanServer mbs, int queueSize) {
+ if (logger.traceOn())
+ logger.trace("Constructor", "queueSize=" + queueSize);
+
+ if (mbs == null || queueSize < 1)
+ throw new IllegalArgumentException("Bad args");
+
+ this.mBeanServer = mbs;
+ this.queueSize = queueSize;
+ this.queue = new ArrayQueue<NamedNotification>(queueSize);
+ this.earliestSequenceNumber = System.currentTimeMillis();
+ this.nextSequenceNumber = this.earliestSequenceNumber;
+
+ createListeners();
+
+ logger.trace("Constructor", "ends");
+ }
+
+ private synchronized boolean isDisposed() {
+ return disposed;
+ }
+
+ public void dispose() {
+ logger.trace("dispose", "starts");
+
+ synchronized(this) {
+ removeNotificationBuffer(mBeanServer);
+ disposed = true;
+ //Notify potential waiting fetchNotification call
+ notifyAll();
+ }
+
+ destroyListeners();
+
+ logger.trace("dispose", "ends");
+ }
+
+ /**
+ * <p>Fetch notifications that match the given listeners.</p>
+ *
+ * <p>The operation only considers notifications with a sequence
+ * number at least <code>startSequenceNumber</code>. It will take
+ * no longer than <code>timeout</code>, and will return no more
+ * than <code>maxNotifications</code> different notifications.</p>
+ *
+ * <p>If there are no notifications matching the criteria, the
+ * operation will block until one arrives, subject to the
+ * timeout.</p>
+ *
+ * @param filter an object that will add notifications to a
+ * {@code List<TargetedNotification>} if they match the current
+ * listeners with their filters.
+ * @param startSequenceNumber the first sequence number to
+ * consider.
+ * @param timeout the maximum time to wait. May be 0 to indicate
+ * not to wait if there are no notifications.
+ * @param maxNotifications the maximum number of notifications to
+ * return. May be 0 to indicate a wait for eligible notifications
+ * that will return a usable <code>nextSequenceNumber</code>. The
+ * {@link TargetedNotification} array in the returned {@link
+ * NotificationResult} may contain more than this number of
+ * elements but will not contain more than this number of
+ * different notifications.
+ */
+ public NotificationResult
+ fetchNotifications(NotificationBufferFilter filter,
+ long startSequenceNumber,
+ long timeout,
+ int maxNotifications)
+ throws InterruptedException {
+
+ logger.trace("fetchNotifications", "starts");
+
+ if (startSequenceNumber < 0 || isDisposed()) {
+ synchronized(this) {
+ return new NotificationResult(earliestSequenceNumber(),
+ nextSequenceNumber(),
+ new TargetedNotification[0]);
+ }
+ }
+
+ // Check arg validity
+ if (filter == null
+ || startSequenceNumber < 0 || timeout < 0
+ || maxNotifications < 0) {
+ logger.trace("fetchNotifications", "Bad args");
+ throw new IllegalArgumentException("Bad args to fetch");
+ }
+
+ if (logger.debugOn()) {
+ logger.trace("fetchNotifications",
+ "filter=" + filter + "; startSeq=" +
+ startSequenceNumber + "; timeout=" + timeout +
+ "; max=" + maxNotifications);
+ }
+
+ if (startSequenceNumber > nextSequenceNumber()) {
+ final String msg = "Start sequence number too big: " +
+ startSequenceNumber + " > " + nextSequenceNumber();
+ logger.trace("fetchNotifications", msg);
+ throw new IllegalArgumentException(msg);
+ }
+
+ /* Determine the end time corresponding to the timeout value.
+ Caller may legitimately supply Long.MAX_VALUE to indicate no
+ timeout. In that case the addition will overflow and produce
+ a negative end time. Set end time to Long.MAX_VALUE in...
[truncated message content] |
|
From: <ls...@us...> - 2007-10-15 05:10:41
|
Revision: 3554
http://jnode.svn.sourceforge.net/jnode/?rev=3554&view=rev
Author: lsantha
Date: 2007-10-14 22:10:39 -0700 (Sun, 14 Oct 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/javax/javax/swing/MultiUIDefaults.java
trunk/core/src/openjdk/sun/sun/awt/image/BufImgVolatileSurfaceManager.java
trunk/core/src/openjdk/sun/sun/awt/image/SunVolatileImage.java
trunk/core/src/openjdk/sun/sun/awt/image/VolatileSurfaceManager.java
trunk/core/src/openjdk/sun/sun/print/PrinterGraphicsConfig.java
trunk/core/src/openjdk/sun/sun/print/PrinterGraphicsDevice.java
trunk/core/src/openjdk/vm/sun/java2d/
trunk/core/src/openjdk/vm/sun/java2d/SurfaceManagerFactory.java
Added: trunk/core/src/openjdk/javax/javax/swing/MultiUIDefaults.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/swing/MultiUIDefaults.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/swing/MultiUIDefaults.java 2007-10-15 05:10:39 UTC (rev 3554)
@@ -0,0 +1,216 @@
+/*
+ * Copyright 1997-2003 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.swing;
+
+import java.util.Enumeration;
+import java.util.Locale;
+
+
+
+/**
+ *
+ * @version 1.10 02/02/00
+ * @author Hans Muller
+ */
+class MultiUIDefaults extends UIDefaults
+{
+ private UIDefaults[] tables;
+
+ public MultiUIDefaults(UIDefaults[] defaults) {
+ super();
+ tables = defaults;
+ }
+
+ public MultiUIDefaults() {
+ super();
+ tables = new UIDefaults[0];
+ }
+
+
+ public Object get(Object key)
+ {
+ Object value = super.get(key);
+ if (value != null) {
+ return value;
+ }
+
+ for(int i = 0; i < tables.length; i++) {
+ UIDefaults table = tables[i];
+ value = (table != null) ? table.get(key) : null;
+ if (value != null) {
+ return value;
+ }
+ }
+
+ return null;
+ }
+
+
+ public Object get(Object key, Locale l)
+ {
+ Object value = super.get(key,l);
+ if (value != null) {
+ return value;
+ }
+
+ for(int i = 0; i < tables.length; i++) {
+ UIDefaults table = tables[i];
+ value = (table != null) ? table.get(key,l) : null;
+ if (value != null) {
+ return value;
+ }
+ }
+
+ return null;
+ }
+
+
+ public int size() {
+ int n = super.size();
+ for(int i = 0; i < tables.length; i++) {
+ UIDefaults table = tables[i];
+ n += (table != null) ? table.size() : 0;
+ }
+ return n;
+ }
+
+
+ public boolean isEmpty() {
+ return size() == 0;
+ }
+
+
+ public Enumeration keys()
+ {
+ Enumeration[] enums = new Enumeration[1 + tables.length];
+ enums[0] = super.keys();
+ for(int i = 0; i < tables.length; i++) {
+ UIDefaults table = tables[i];
+ if (table != null) {
+ enums[i + 1] = table.keys();
+ }
+ }
+ return new MultiUIDefaultsEnumerator(enums);
+ }
+
+
+ public Enumeration elements()
+ {
+ Enumeration[] enums = new Enumeration[1 + tables.length];
+ enums[0] = super.elements();
+ for(int i = 0; i < tables.length; i++) {
+ UIDefaults table = tables[i];
+ if (table != null) {
+ enums[i + 1] = table.elements();
+ }
+ }
+ return new MultiUIDefaultsEnumerator(enums);
+ }
+
+ protected void getUIError(String msg) {
+ if (tables.length > 0) {
+ tables[0].getUIError(msg);
+ } else {
+ super.getUIError(msg);
+ }
+ }
+
+ private static class MultiUIDefaultsEnumerator implements Enumeration
+ {
+ Enumeration[] enums;
+ int n = 0;
+
+ MultiUIDefaultsEnumerator(Enumeration[] enums) {
+ this.enums = enums;
+ }
+
+ public boolean hasMoreElements() {
+ for(int i = n; i < enums.length; i++) {
+ Enumeration e = enums[i];
+ if ((e != null) && (e.hasMoreElements())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public Object nextElement() {
+ for(; n < enums.length; n++) {
+ Enumeration e = enums[n];
+ if ((e != null) && (e.hasMoreElements())) {
+ return e.nextElement();
+ }
+ }
+ return null;
+ }
+ }
+
+
+ public Object remove(Object key)
+ {
+ Object value = super.remove(key);
+ if (value != null) {
+ return value;
+ }
+
+ for(int i = 0; i < tables.length; i++) {
+ UIDefaults table = tables[i];
+ value = (table != null) ? table.remove(key) : null;
+ if (value != null) {
+ return value;
+ }
+ }
+
+ return null;
+ }
+
+
+ public void clear() {
+ super.clear();
+ for(int i = 0; i < tables.length; i++) {
+ UIDefaults table = tables[i];
+ if (table != null) {
+ table.clear();
+ }
+ }
+ }
+
+ public synchronized String toString() {
+ StringBuffer buf = new StringBuffer();
+ buf.append("{");
+ Enumeration keys = keys();
+ while (keys.hasMoreElements()) {
+ Object key = keys.nextElement();
+ buf.append(key + "=" + get(key) + ", ");
+ }
+ int length = buf.length();
+ if (length > 1) {
+ buf.delete(length-2, length);
+ }
+ buf.append("}");
+ return buf.toString();
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/awt/image/BufImgVolatileSurfaceManager.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/image/BufImgVolatileSurfaceManager.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/image/BufImgVolatileSurfaceManager.java 2007-10-15 05:10:39 UTC (rev 3554)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2003 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.awt.image;
+
+import sun.java2d.SurfaceData;
+
+/**
+ * This SurfaceManager variant manages an unaccelerated volatile surface.
+ * This class is created in the event that someone requested a VolatileImage
+ * to be created from a BufferedImageGraphicsConfig, which is not platform-
+ * or hardware-based, thus the resulting surface and surface manager
+ * are unaccelerated. All we do in this class is implement the abstract
+ * methods of VolatileSurfaceManager to return values that indicate that
+ * we cannot accelerate surfaces through this SurfaceManager, thus the
+ * parent class will handle things through the unaccelerated backup mechanism.
+ */
+public class BufImgVolatileSurfaceManager extends VolatileSurfaceManager {
+
+ /**
+ * This constructor simply defers to the superclass since all of the real
+ * functionality of this class is implemented in VolatileSurfaceManager.
+ */
+ public BufImgVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
+ super(vImg, context);
+ }
+
+ /**
+ * Returns false to indicate that this surface manager cannot accelerate
+ * the image.
+ */
+ protected boolean isAccelerationEnabled() {
+ return false;
+ }
+
+ /**
+ * Returns null to indicate failure in creating the accelerated surface.
+ * Note that this method should not ever be called since creation of
+ * accelerated surfaces should be preceded by calls to the above
+ * isAccelerationEnabled() method. But we need to override this method
+ * since it is abstract in our parent class.
+ */
+ protected SurfaceData initAcceleratedSurface() {
+ return null;
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/awt/image/SunVolatileImage.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/image/SunVolatileImage.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/image/SunVolatileImage.java 2007-10-15 05:10:39 UTC (rev 3554)
@@ -0,0 +1,250 @@
+/*
+ * Copyright 2000-2007 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.awt.image;
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.ImageCapabilities;
+import java.awt.Transparency;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.ImageObserver;
+import java.awt.image.VolatileImage;
+import java.awt.image.WritableRaster;
+import sun.java2d.SunGraphics2D;
+import sun.java2d.SurfaceData;
+import sun.java2d.SurfaceManagerFactory;
+
+/**
+ * This class is the base implementation of the VolatileImage
+ * abstract class. The class implements most of the standard Image
+ * methods (width, height, etc.) but delegates all surface management
+ * issues to a platform-specific VolatileSurfaceManager. When a new instance
+ * of SunVolatileImage is created, it automatically creates an
+ * appropriate VolatileSurfaceManager for the GraphicsConfiguration
+ * under which this SunVolatileImage was created.
+ */
+public class SunVolatileImage extends VolatileImage {
+
+ protected VolatileSurfaceManager volSurfaceManager;
+ protected Component comp;
+ private GraphicsConfiguration graphicsConfig;
+ private Font defaultFont;
+ private int width, height;
+
+ private SunVolatileImage(Component comp,
+ GraphicsConfiguration graphicsConfig,
+ int width, int height, Object context,
+ int transparency, ImageCapabilities caps)
+ {
+ this.comp = comp;
+ this.graphicsConfig = graphicsConfig;
+ this.width = width;
+ this.height = height;
+ if (!(transparency == Transparency.OPAQUE ||
+ transparency == Transparency.BITMASK ||
+ transparency == Transparency.TRANSLUCENT))
+ {
+ throw new IllegalArgumentException("Unknown transparency type:" +
+ transparency);
+ }
+ this.transparency = transparency;
+ this.volSurfaceManager = createSurfaceManager(context, caps);
+ SurfaceManager.setManager(this, volSurfaceManager);
+
+ // post-construction initialization of the surface manager
+ volSurfaceManager.initialize();
+ // clear the background
+ volSurfaceManager.initContents();
+ }
+
+ private SunVolatileImage(Component comp,
+ GraphicsConfiguration graphicsConfig,
+ int width, int height, Object context,
+ ImageCapabilities caps)
+ {
+ this(comp, graphicsConfig,
+ width, height, context, Transparency.OPAQUE, caps);
+ }
+
+ public SunVolatileImage(Component comp, int width, int height) {
+ this(comp, width, height, null);
+ }
+
+ public SunVolatileImage(Component comp,
+ int width, int height, Object context)
+ {
+ this(comp, comp.getGraphicsConfiguration(),
+ width, height, context, null);
+ }
+
+ public SunVolatileImage(GraphicsConfiguration graphicsConfig,
+ int width, int height, int transparency,
+ ImageCapabilities caps)
+ {
+ this(null, graphicsConfig, width, height, null, transparency, caps);
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public GraphicsConfiguration getGraphicsConfig() {
+ return graphicsConfig;
+ }
+
+ public void updateGraphicsConfig() {
+ // If this VImage is associated with a Component, get an updated
+ // graphicsConfig from that component. Otherwise, keep the one
+ // that we were created with
+ if (comp != null) {
+ GraphicsConfiguration gc = comp.getGraphicsConfiguration();
+ if (gc != null) {
+ // Could potentially be null in some failure situations;
+ // better to keep the old non-null value around than to
+ // set graphicsConfig to null
+ graphicsConfig = gc;
+ }
+ }
+ }
+
+ public Component getComponent() {
+ return comp;
+ }
+
+ protected VolatileSurfaceManager createSurfaceManager(Object context,
+ ImageCapabilities caps)
+ {
+ /**
+ * Platform-specific SurfaceManagerFactories will return a
+ * manager suited to acceleration on each platform. But if
+ * the user is asking for a VolatileImage from a BufferedImageGC,
+ * then we need to return the appropriate unaccelerated manager.
+ * Note: this could change in the future; if some platform would
+ * like to accelerate BIGC volatile images, then this special-casing
+ * of the BIGC graphicsConfig should live in platform-specific
+ * code instead.
+ * We do the same for a Printer Device, and if user requested an
+ * unaccelerated VolatileImage by passing the capabilities object.
+ */
+ if (graphicsConfig instanceof BufferedImageGraphicsConfig ||
+ graphicsConfig instanceof sun.print.PrinterGraphicsConfig ||
+ (caps != null && !caps.isAccelerated()))
+ {
+ return new BufImgVolatileSurfaceManager(this, context);
+ }
+ return SurfaceManagerFactory.createVolatileManager(this, context);
+ }
+
+ private Color getForeground() {
+ if (comp != null) {
+ return comp.getForeground();
+ } else {
+ return Color.black;
+ }
+ }
+
+ private Color getBackground() {
+ if (comp != null) {
+ return comp.getBackground();
+ } else {
+ return Color.white;
+ }
+ }
+
+ private Font getFont() {
+ if (comp != null) {
+ return comp.getFont();
+ } else {
+ if (defaultFont == null) {
+ defaultFont = new Font("Dialog", Font.PLAIN, 12);
+ }
+ return defaultFont;
+ }
+ }
+
+ public Graphics2D createGraphics() {
+ return new SunGraphics2D(volSurfaceManager.getPrimarySurfaceData(),
+ getForeground(),
+ getBackground(),
+ getFont());
+ }
+
+ // Image method implementations
+ public Object getProperty(String name, ImageObserver observer) {
+ if (name == null) {
+ throw new NullPointerException("null property name is not allowed");
+ }
+ return java.awt.Image.UndefinedProperty;
+ }
+
+ public int getWidth(ImageObserver observer) {
+ return getWidth();
+ }
+
+ public int getHeight(ImageObserver observer) {
+ return getHeight();
+ }
+
+ /**
+ * This method creates a BufferedImage intended for use as a "snapshot"
+ * or a backup surface.
+ */
+ public BufferedImage getBackupImage() {
+ return graphicsConfig.createCompatibleImage(getWidth(), getHeight(),
+ getTransparency());
+ }
+
+ public BufferedImage getSnapshot() {
+ BufferedImage bi = getBackupImage();
+ Graphics2D g = bi.createGraphics();
+ g.setComposite(AlphaComposite.Src);
+ g.drawImage(this, 0, 0, null);
+ g.dispose();
+ return bi;
+ }
+
+ public int validate(GraphicsConfiguration gc) {
+ return volSurfaceManager.validate(gc);
+ }
+
+ public boolean contentsLost() {
+ return volSurfaceManager.contentsLost();
+ }
+
+ public ImageCapabilities getCapabilities() {
+ return volSurfaceManager.getCapabilities(graphicsConfig);
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/awt/image/VolatileSurfaceManager.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/image/VolatileSurfaceManager.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/image/VolatileSurfaceManager.java 2007-10-15 05:10:39 UTC (rev 3554)
@@ -0,0 +1,400 @@
+/*
+ * Copyright 2003-2007 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.awt.image;
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsEnvironment;
+import java.awt.ImageCapabilities;
+import java.awt.image.BufferedImage;
+import java.awt.image.VolatileImage;
+import sun.awt.DisplayChangedListener;
+import sun.awt.image.SunVolatileImage;
+import sun.java2d.SunGraphicsEnvironment;
+import sun.java2d.SurfaceData;
+import sun.java2d.loops.CompositeType;
+
+/**
+ * This SurfaceManager variant manages an accelerated volatile surface, if it
+ * is possible to create that surface. If there is limited accelerated
+ * memory, or if the volatile surface disappears due to an operating system
+ * event, the VolatileSurfaceManager will attempt to restore the
+ * accelerated surface. If that fails, a system memory surface will be
+ * created in its place.
+ */
+public abstract class VolatileSurfaceManager
+ extends SurfaceManager
+ implements DisplayChangedListener
+{
+ /**
+ * A reference to the VolatileImage whose contents are being managed.
+ */
+ protected SunVolatileImage vImg;
+
+ /**
+ * The accelerated SurfaceData object.
+ */
+ protected SurfaceData sdAccel;
+
+ /**
+ * The software-based SurfaceData object. Only create when first asked
+ * to (otherwise it is a waste of memory as it will only be used in
+ * situations of surface loss).
+ */
+ protected SurfaceData sdBackup;
+
+ /**
+ * The current SurfaceData object.
+ */
+ protected SurfaceData sdCurrent;
+
+ /**
+ * A record-keeping object. This keeps track of which SurfaceData was
+ * in use during the last call to validate(). This lets us see whether
+ * the SurfaceData object has changed since then and allows us to return
+ * the correct returnCode to the user in the validate() call.
+ */
+ protected SurfaceData sdPrevious;
+
+ /**
+ * Tracks loss of surface contents; queriable by user to see whether
+ * contents need to be restored.
+ */
+ protected boolean lostSurface;
+
+ /**
+ * Context for extra initialization parameters.
+ */
+ protected Object context;
+
+ protected VolatileSurfaceManager(SunVolatileImage vImg, Object context) {
+ this.vImg = vImg;
+ this.context = context;
+
+ GraphicsEnvironment ge =
+ GraphicsEnvironment.getLocalGraphicsEnvironment();
+ // We could have a HeadlessGE at this point, so double-check before
+ // assuming anything.
+ if (ge instanceof SunGraphicsEnvironment) {
+ ((SunGraphicsEnvironment)ge).addDisplayChangedListener(this);
+ }
+ }
+
+ /**
+ * This init function is separate from the constructor because the
+ * things we are doing here necessitate the object's existence.
+ * Otherwise, we end up calling into a subclass' overridden method
+ * during construction, before that subclass is completely constructed.
+ */
+ public void initialize() {
+ if (isAccelerationEnabled()) {
+ sdAccel = initAcceleratedSurface();
+ if (sdAccel != null) {
+ sdCurrent = sdAccel;
+ }
+ }
+ if (sdCurrent == null) {
+ sdCurrent = getBackupSurface();
+ }
+ }
+
+ public SurfaceData getPrimarySurfaceData() {
+ return sdCurrent;
+ }
+
+ /**
+ * Returns true if acceleration is enabled. If not, we simply use the
+ * backup SurfaceData object and return quickly from most methods
+ * in this class.
+ */
+ protected abstract boolean isAccelerationEnabled();
+
+ /**
+ * Get the image ready for rendering. This method is called to make
+ * sure that the accelerated SurfaceData exists and is
+ * ready to be used. Users call this method prior to any set of
+ * rendering to or from the image, to make sure the image is ready
+ * and compatible with the given GraphicsConfiguration.
+ *
+ * The image may not be "ready" if either we had problems creating
+ * it in the first place (e.g., there was no space in vram) or if
+ * the surface became lost (e.g., some other app or the OS caused
+ * vram surfaces to be removed).
+ *
+ * Note that we want to return RESTORED in any situation where the
+ * SurfaceData is different than it was last time. So whether it's
+ * software or hardware, if we have a different SurfaceData object,
+ * then the contents have been altered and we must reflect that
+ * change to the user.
+ */
+ public int validate(GraphicsConfiguration gc) {
+ int returnCode = VolatileImage.IMAGE_OK;
+ boolean lostSurfaceTmp = lostSurface;
+ lostSurface = false;
+
+ if (isAccelerationEnabled()) {
+ if (!isConfigValid(gc)) {
+ // If we're asked to render to a different device than the
+ // one we were created under, return INCOMPATIBLE error code.
+ // Note that a null gc simply ignores the incompatibility
+ // issue
+ returnCode = VolatileImage.IMAGE_INCOMPATIBLE;
+ } else if (sdAccel == null) {
+ // We either had problems creating the surface or the display
+ // mode changed and we nullified the old one. Try it again.
+ sdAccel = initAcceleratedSurface();
+ if (sdAccel != null) {
+ // set the current SurfaceData to accelerated version
+ sdCurrent = sdAccel;
+ // we don't need the system memory surface anymore, so
+ // let's release it now (it can always be restored later)
+ sdBackup = null;
+ returnCode = VolatileImage.IMAGE_RESTORED;
+ } else {
+ sdCurrent = getBackupSurface();
+ }
+ } else if (sdAccel.isSurfaceLost()) {
+ try {
+ restoreAcceleratedSurface();
+ // set the current SurfaceData to accelerated version
+ sdCurrent = sdAccel;
+ // restoration successful: accel surface no longer lost
+ sdAccel.setSurfaceLost(false);
+ // we don't need the system memory surface anymore, so
+ // let's release it now (it can always be restored later)
+ sdBackup = null;
+ returnCode = VolatileImage.IMAGE_RESTORED;
+ } catch (sun.java2d.InvalidPipeException e) {
+ // Set the current SurfaceData to software version so that
+ // drawing can continue. Note that we still have
+ // the lostAccelSurface flag set so that we will continue
+ // to attempt to restore the accelerated surface.
+ sdCurrent = getBackupSurface();
+ }
+ } else if (lostSurfaceTmp) {
+ // Something else triggered this loss/restoration. Could
+ // be a palette change that didn't require a SurfaceData
+ // recreation but merely a re-rendering of the pixels.
+ returnCode = VolatileImage.IMAGE_RESTORED;
+ }
+ } else if (sdAccel != null) {
+ // if the "acceleration enabled" state changed to disabled,
+ // switch to software surface
+ sdCurrent = getBackupSurface();
+ sdAccel = null;
+ returnCode = VolatileImage.IMAGE_RESTORED;
+ }
+
+ if ((returnCode != VolatileImage.IMAGE_INCOMPATIBLE) &&
+ (sdCurrent != sdPrevious))
+ {
+ // contents have changed - return RESTORED to user
+ sdPrevious = sdCurrent;
+ returnCode = VolatileImage.IMAGE_RESTORED;
+ }
+
+ if (returnCode == VolatileImage.IMAGE_RESTORED) {
+ // clear the current surface with the background color,
+ // only if the surface has been restored
+ initContents();
+ }
+
+ return returnCode;
+ }
+
+ /**
+ * Returns true if rendering data was lost since the last validate call.
+ *
+ * @see java.awt.image.VolatileImage#contentsLost
+ */
+ public boolean contentsLost() {
+ return lostSurface;
+ }
+
+ /**
+ * Creates a new accelerated surface that is compatible with the
+ * current GraphicsConfiguration. Returns the new accelerated
+ * SurfaceData object, or null if the surface creation was not successful.
+ *
+ * Platform-specific subclasses should initialize an accelerated
+ * surface (e.g. a DirectDraw surface on Windows, an OpenGL pbuffer,
+ * or an X11 pixmap).
+ */
+ protected abstract SurfaceData initAcceleratedSurface();
+
+ /**
+ * Creates a software-based surface (of type BufImgSurfaceData).
+ * The software representation is only created when needed, which
+ * is only during some situation in which the hardware surface
+ * cannot be allocated. This allows apps to at least run,
+ * albeit more slowly than they would otherwise.
+ */
+ protected SurfaceData getBackupSurface() {
+ if (sdBackup == null) {
+ BufferedImage bImg = vImg.getBackupImage();
+ // Sabotage the acceleration capabilities of the BufImg surface
+ SunWritableRaster.stealTrackable(bImg
+ .getRaster()
+ .getDataBuffer()).setUntrackable();
+ sdBackup = BufImgSurfaceData.createData(bImg);
+ }
+ return sdBackup;
+ }
+
+ /**
+ * Set contents of the current SurfaceData to default state (i.e. clear
+ * the background).
+ */
+ public void initContents() {
+ Graphics g = vImg.createGraphics();
+ g.clearRect(0, 0, vImg.getWidth(), vImg.getHeight());
+ g.dispose();
+ }
+
+ /**
+ * Called from a SurfaceData object, indicating that our
+ * accelerated surface has been lost and should be restored (perhaps
+ * using a backup system memory surface). Returns the newly restored
+ * primary SurfaceData object.
+ */
+ public SurfaceData restoreContents() {
+ return getBackupSurface();
+ }
+
+ /**
+ * If the accelerated surface is the current SurfaceData for this manager,
+ * sets the variable lostSurface to true, which indicates that something
+ * happened to the image under management. This variable is used in the
+ * validate method to tell the caller that the surface contents need to
+ * be restored.
+ */
+ public void acceleratedSurfaceLost() {
+ if (isAccelerationEnabled()...
[truncated message content] |
|
From: <ls...@us...> - 2008-03-28 21:02:47
|
Revision: 3899
http://jnode.svn.sourceforge.net/jnode/?rev=3899&view=rev
Author: lsantha
Date: 2008-03-28 14:02:46 -0700 (Fri, 28 Mar 2008)
Log Message:
-----------
OpenJDK integration.
Added Paths:
-----------
trunk/core/src/openjdk/com/com/sun/imageio/stream/
trunk/core/src/openjdk/com/com/sun/imageio/stream/CloseableDisposerRecord.java
trunk/core/src/openjdk/com/com/sun/imageio/stream/StreamCloser.java
trunk/core/src/openjdk/com/com/sun/imageio/stream/StreamFinalizer.java
trunk/core/src/openjdk/javax/javax/imageio/stream/
trunk/core/src/openjdk/javax/javax/imageio/stream/FileCacheImageInputStream.java
trunk/core/src/openjdk/javax/javax/imageio/stream/FileCacheImageOutputStream.java
trunk/core/src/openjdk/javax/javax/imageio/stream/FileImageInputStream.java
trunk/core/src/openjdk/javax/javax/imageio/stream/FileImageOutputStream.java
trunk/core/src/openjdk/javax/javax/imageio/stream/IIOByteBuffer.java
trunk/core/src/openjdk/javax/javax/imageio/stream/ImageInputStream.java
trunk/core/src/openjdk/javax/javax/imageio/stream/ImageInputStreamImpl.java
trunk/core/src/openjdk/javax/javax/imageio/stream/ImageOutputStream.java
trunk/core/src/openjdk/javax/javax/imageio/stream/ImageOutputStreamImpl.java
trunk/core/src/openjdk/javax/javax/imageio/stream/MemoryCache.java
trunk/core/src/openjdk/javax/javax/imageio/stream/MemoryCacheImageInputStream.java
trunk/core/src/openjdk/javax/javax/imageio/stream/MemoryCacheImageOutputStream.java
trunk/core/src/openjdk/javax/javax/imageio/stream/package.html
Added: trunk/core/src/openjdk/com/com/sun/imageio/stream/CloseableDisposerRecord.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/imageio/stream/CloseableDisposerRecord.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/imageio/stream/CloseableDisposerRecord.java 2008-03-28 21:02:46 UTC (rev 3899)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.imageio.stream;
+
+import java.io.Closeable;
+import java.io.IOException;
+import sun.java2d.DisposerRecord;
+
+/**
+ * Convenience class that closes a given resource (e.g. RandomAccessFile),
+ * typically associated with an Image{Input,Output}Stream, prior to the
+ * stream being garbage collected.
+ */
+public class CloseableDisposerRecord implements DisposerRecord {
+ private Closeable closeable;
+
+ public CloseableDisposerRecord(Closeable closeable) {
+ this.closeable = closeable;
+ }
+
+ public synchronized void dispose() {
+ if (closeable != null) {
+ try {
+ closeable.close();
+ } catch (IOException e) {
+ } finally {
+ closeable = null;
+ }
+ }
+ }
+}
Added: trunk/core/src/openjdk/com/com/sun/imageio/stream/StreamCloser.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/imageio/stream/StreamCloser.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/imageio/stream/StreamCloser.java 2008-03-28 21:02:46 UTC (rev 3899)
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.imageio.stream;
+
+import java.io.IOException;
+import java.util.Set;
+import java.util.WeakHashMap;
+import javax.imageio.stream.ImageInputStream;
+
+/**
+ * This class provide means to properly close hanging
+ * image input/output streams on VM shutdown.
+ * This might be useful for proper cleanup such as removal
+ * of temporary files.
+ *
+ * Addition of stream do not prevent it from being garbage collected
+ * if no other references to it exists. Stream can be closed
+ * explicitly without removal from StreamCloser queue.
+ * Explicit removal from the queue only helps to save some memory.
+ */
+public class StreamCloser {
+
+ private static WeakHashMap<ImageInputStream, Object> toCloseQueue;
+ private static Thread streamCloser;
+
+ public static void addToQueue(ImageInputStream iis) {
+ synchronized (StreamCloser.class) {
+ if (toCloseQueue == null) {
+ toCloseQueue =
+ new WeakHashMap<ImageInputStream, Object>();
+ }
+
+ toCloseQueue.put(iis, null);
+
+ if (streamCloser == null) {
+ final Runnable streamCloserRunnable = new Runnable() {
+ public void run() {
+ if (toCloseQueue != null) {
+ synchronized (StreamCloser.class) {
+ Set<ImageInputStream> set =
+ toCloseQueue.keySet();
+ // Make a copy of the set in order to avoid
+ // concurrent modification (the is.close()
+ // will in turn call removeFromQueue())
+ ImageInputStream[] streams =
+ new ImageInputStream[set.size()];
+ streams = set.toArray(streams);
+ for (ImageInputStream is : streams) {
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ /* The thread must be a member of a thread group
+ * which will not get GCed before VM exit.
+ * Make its parent the top-level thread group.
+ */
+ ThreadGroup tg =
+ Thread.currentThread().getThreadGroup();
+ for (ThreadGroup tgn = tg;
+ tgn != null;
+ tg = tgn, tgn = tg.getParent());
+ streamCloser = new Thread(tg, streamCloserRunnable);
+ Runtime.getRuntime().addShutdownHook(streamCloser);
+ return null;
+ }
+ });
+ }
+ }
+ }
+
+ public static void removeFromQueue(ImageInputStream iis) {
+ synchronized (StreamCloser.class) {
+ if (toCloseQueue != null) {
+ toCloseQueue.remove(iis);
+ }
+ }
+ }
+}
Added: trunk/core/src/openjdk/com/com/sun/imageio/stream/StreamFinalizer.java
===================================================================
--- trunk/core/src/openjdk/com/com/sun/imageio/stream/StreamFinalizer.java (rev 0)
+++ trunk/core/src/openjdk/com/com/sun/imageio/stream/StreamFinalizer.java 2008-03-28 21:02:46 UTC (rev 3899)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2005 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.imageio.stream;
+
+import java.io.IOException;
+import javax.imageio.stream.ImageInputStream;
+
+/**
+ * Small class to assist in properly closing an ImageInputStream instance
+ * prior to garbage collection. The ImageInputStreamImpl class defines a
+ * finalize() method, but in a number of its public subclasses
+ * (e.g. FileImageInputStream) we override the finalize() method to be
+ * empty for performance reasons, and instead rely on the Disposer mechanism
+ * for closing/disposing resources. This is fine when one of these classes
+ * is instantiated directly (e.g. new FileImageInputStream()) but in the
+ * unlikely case where a user defines their own subclass of one of those
+ * streams, we need some way to get back to the behavior of
+ * ImageInputStreamImpl, which will call close() as part of finalization.
+ *
+ * Typically an Image{Input,Output}Stream will construct an instance of
+ * StreamFinalizer in its constructor if it detects that it has been
+ * subclassed by the user. The ImageInputStream instance will hold a
+ * reference to the StreamFinalizer, and the StreamFinalizer will hold a
+ * reference back to the ImageInputStream from which it was created. When
+ * both are no longer reachable, the StreamFinalizer.finalize() method will
+ * be called, which will take care of closing down the ImageInputStream.
+ *
+ * Clearly this is a bit of a hack, but it will likely only be used in the
+ * rarest of circumstances: when a user has subclassed one of the public
+ * stream classes. (It should be no worse than the old days when the public
+ * stream classes had non-empty finalize() methods.)
+ */
+public class StreamFinalizer {
+ private ImageInputStream stream;
+
+ public StreamFinalizer(ImageInputStream stream) {
+ this.stream = stream;
+ }
+
+ protected void finalize() throws Throwable {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ } finally {
+ stream = null;
+ super.finalize();
+ }
+ }
+}
Added: trunk/core/src/openjdk/javax/javax/imageio/stream/FileCacheImageInputStream.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/imageio/stream/FileCacheImageInputStream.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/imageio/stream/FileCacheImageInputStream.java 2008-03-28 21:02:46 UTC (rev 3899)
@@ -0,0 +1,286 @@
+/*
+ * Copyright 2000-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.imageio.stream;
+
+import java.io.DataInput;
+import java.io.File;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import com.sun.imageio.stream.StreamCloser;
+import com.sun.imageio.stream.StreamFinalizer;
+import sun.java2d.Disposer;
+import sun.java2d.DisposerRecord;
+
+/**
+ * An implementation of <code>ImageInputStream</code> that gets its
+ * input from a regular <code>InputStream</code>. A file is used to
+ * cache previously read data.
+ *
+ * @version 0.5
+ */
+public class FileCacheImageInputStream extends ImageInputStreamImpl {
+
+ private InputStream stream;
+
+ private File cacheFile;
+
+ private RandomAccessFile cache;
+
+ private static final int BUFFER_LENGTH = 1024;
+
+ private byte[] buf = new byte[BUFFER_LENGTH];
+
+ private long length = 0L;
+
+ private boolean foundEOF = false;
+
+ /** The referent to be registered with the Disposer. */
+ private final Object disposerReferent;
+
+ /** The DisposerRecord that closes the underlying cache. */
+ private final DisposerRecord disposerRecord;
+
+ /**
+ * Constructs a <code>FileCacheImageInputStream</code> that will read
+ * from a given <code>InputStream</code>.
+ *
+ * <p> A temporary file is used as a cache. If
+ * <code>cacheDir</code>is non-<code>null</code> and is a
+ * directory, the file will be created there. If it is
+ * <code>null</code>, the system-dependent default temporary-file
+ * directory will be used (see the documentation for
+ * <code>File.createTempFile</code> for details).
+ *
+ * @param stream an <code>InputStream</code> to read from.
+ * @param cacheDir a <code>File</code> indicating where the
+ * cache file should be created, or <code>null</code> to use the
+ * system directory.
+ *
+ * @exception IllegalArgumentException if <code>stream</code> is
+ * <code>null</code>.
+ * @exception IllegalArgumentException if <code>cacheDir</code> is
+ * non-<code>null</code> but is not a directory.
+ * @exception IOException if a cache file cannot be created.
+ */
+ public FileCacheImageInputStream(InputStream stream, File cacheDir)
+ throws IOException {
+ if (stream == null) {
+ throw new IllegalArgumentException("stream == null!");
+ }
+ if ((cacheDir != null) && !(cacheDir.isDirectory())) {
+ throw new IllegalArgumentException("Not a directory!");
+ }
+ this.stream = stream;
+ this.cacheFile =
+ File.createTempFile("imageio", ".tmp", cacheDir);
+ this.cache = new RandomAccessFile(cacheFile, "rw");
+ StreamCloser.addToQueue(this);
+
+ disposerRecord = new StreamDisposerRecord(cacheFile, cache);
+ if (getClass() == FileCacheImageInputStream.class) {
+ disposerReferent = new Object();
+ Disposer.addRecord(disposerReferent, disposerRecord);
+ } else {
+ disposerReferent = new StreamFinalizer(this);
+ }
+ }
+
+ /**
+ * Ensures that at least <code>pos</code> bytes are cached,
+ * or the end of the source is reached. The return value
+ * is equal to the smaller of <code>pos</code> and the
+ * length of the source file.
+ */
+ private long readUntil(long pos) throws IOException {
+ // We've already got enough data cached
+ if (pos < length) {
+ return pos;
+ }
+ // pos >= length but length isn't getting any bigger, so return it
+ if (foundEOF) {
+ return length;
+ }
+
+ long len = pos - length;
+ cache.seek(length);
+ while (len > 0) {
+ // Copy a buffer's worth of data from the source to the cache
+ // BUFFER_LENGTH will always fit into an int so this is safe
+ int nbytes =
+ stream.read(buf, 0, (int)Math.min(len, (long)BUFFER_LENGTH));
+ if (nbytes == -1) {
+ foundEOF = true;
+ return length;
+ }
+
+ cache.write(buf, 0, nbytes);
+ len -= nbytes;
+ length += nbytes;
+ }
+
+ return pos;
+ }
+
+ public int read() throws IOException {
+ checkClosed();
+ bitOffset = 0;
+ long next = streamPos + 1;
+ long pos = readUntil(next);
+ if (pos >= next) {
+ cache.seek(streamPos++);
+ return cache.read();
+ } else {
+ return -1;
+ }
+ }
+
+ public int read(byte[] b, int off, int len) throws IOException {
+ checkClosed();
+
+ if (b == null) {
+ throw new NullPointerException("b == null!");
+ }
+ // Fix 4430357 - if off + len < 0, overflow occurred
+ if (off < 0 || len < 0 || off + len > b.length || off + len < 0) {
+ throw new IndexOutOfBoundsException
+ ("off < 0 || len < 0 || off+len > b.length || off+len < 0!");
+ }
+
+ bitOffset = 0;
+
+ if (len == 0) {
+ return 0;
+ }
+
+ long pos = readUntil(streamPos + len);
+
+ // len will always fit into an int so this is safe
+ len = (int)Math.min((long)len, pos - streamPos);
+ if (len > 0) {
+ cache.seek(streamPos);
+ cache.readFully(b, off, len);
+ streamPos += len;
+ return len;
+ } else {
+ return -1;
+ }
+ }
+
+ /**
+ * Returns <code>true</code> since this
+ * <code>ImageInputStream</code> caches data in order to allow
+ * seeking backwards.
+ *
+ * @return <code>true</code>.
+ *
+ * @see #isCachedMemory
+ * @see #isCachedFile
+ */
+ public boolean isCached() {
+ return true;
+ }
+
+ /**
+ * Returns <code>true</code> since this
+ * <code>ImageInputStream</code> maintains a file cache.
+ *
+ * @return <code>true</code>.
+ *
+ * @see #isCached
+ * @see #isCachedMemory
+ */
+ public boolean isCachedFile() {
+ return true;
+ }
+
+ /**
+ * Returns <code>false</code> since this
+ * <code>ImageInputStream</code> does not maintain a main memory
+ * cache.
+ *
+ * @return <code>false</code>.
+ *
+ * @see #isCached
+ * @see #isCachedFile
+ */
+ public boolean isCachedMemory() {
+ return false;
+ }
+
+ /**
+ * Closes this <code>FileCacheImageInputStream</code>, closing
+ * and removing the cache file. The source <code>InputStream</code>
+ * is not closed.
+ *
+ * @exception IOException if an error occurs.
+ */
+ public void close() throws IOException {
+ super.close();
+ disposerRecord.dispose(); // this will close/delete the cache file
+ stream = null;
+ cache = null;
+ cacheFile = null;
+ StreamCloser.removeFromQueue(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void finalize() throws Throwable {
+ // Empty finalizer: for performance reasons we instead use the
+ // Disposer mechanism for ensuring that the underlying
+ // RandomAccessFile is closed/deleted prior to garbage collection
+ }
+
+ private static class StreamDisposerRecord implements DisposerRecord {
+ private File cacheFile;
+ private RandomAccessFile cache;
+
+ public StreamDisposerRecord(File cacheFile, RandomAccessFile cache) {
+ this.cacheFile = cacheFile;
+ this.cache = cache;
+ }
+
+ public synchronized void dispose() {
+ if (cache != null) {
+ try {
+ cache.close();
+ } catch (IOException e) {
+ } finally {
+ cache = null;
+ }
+ }
+ if (cacheFile != null) {
+ cacheFile.delete();
+ cacheFile = null;
+ }
+ // Note: Explicit removal of the stream from the StreamCloser
+ // queue is not mandatory in this case, as it will be removed
+ // automatically by GC shortly after this method is called.
+ }
+ }
+}
Added: trunk/core/src/openjdk/javax/javax/imageio/stream/FileCacheImageOutputStream.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/imageio/stream/FileCacheImageOutputStream.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/imageio/stream/FileCacheImageOutputStream.java 2008-03-28 21:02:46 UTC (rev 3899)
@@ -0,0 +1,254 @@
+/*
+ * Copyright 2000-2006 Sun Microsystems, Inc. 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. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.imageio.stream;
+
+import java.io.DataInput;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.RandomAccessFile;
+import com.sun.imageio.stream.StreamCloser;
+
+/**
+ * An implementation of <code>ImageOutputStream</code> that writes its
+ * output to a regular <code>OutputStream</code>. A file is used to
+ * cache data until it is flushed to the output stream.
+ *
+ * @version 0.5
+ */
+public class FileCacheImageOutputStream extends ImageOutputStreamImpl {
+
+ private OutputStream stream;
+
+ private File cacheFile;
+
+ private RandomAccessFile cache;
+
+ // Pos after last (rightmost) byte written
+ private long maxStreamPos = 0L;
+
+ /**
+ * Constructs a <code>FileCacheImageOutputStream</code> that will write
+ * to a given <code>outputStream</code>.
+ *
+ * <p> A temporary file is used as a cache. If
+ * <code>cacheDir</code>is non-<code>null</code> and is a
+ * directory, the file will be created there. If it is
+ * <code>null</code>, the system-dependent default temporary-file
+ * directory will be used (see the documentation for
+ * <code>File.createTempFile</code> for details).
+ *
+ * @param stream an <code>OutputStream</code> to write to.
+ * @param cacheDir a <code>File</code> indicating where the
+ * cache file should be created, or <code>null</code> to use the
+ * system directory.
+ *
+ * @exception IllegalArgumentException if <code>stream</code>
+ * is <code>null</code>.
+ * @exception IllegalArgumentException if <code>cacheDir</code> is
+ * non-<code>null</code> but is not a directory.
+ * @exception IOException if a cache file cannot be created.
+ */
+ public FileCacheImageOutputStream(OutputStream stream, File cacheDir)
+ throws IOException {
+ if (stream == null) {
+ throw new IllegalArgumentException("stream == null!");
+ }
+ if ((cacheDir != null) && !(cacheDir.isDirectory())) {
+ throw new IllegalArgumentException("Not a directory!");
+ }
+ this.stream = stream;
+ this.cacheFile =
+ File.createTempFile("imageio", ".tmp", cacheDir);
+ this.cache = new RandomAccessFile(cacheFile, "rw");
+ StreamCloser.addToQueue(this);
+ }
+
+ public int read() throws IOException {
+ checkClosed();
+ bitOffset = 0;
+ int val = cache.read();
+ if (val != -1) {
+ ++streamPos;
+ }
+ return val;
+ }
+
+ public int read(byte[] b, int off, int len) throws IOException {
+ checkClosed();
+
+ if (b == null) {
+ throw new NullPointerException("b == null!");
+ }
+ if (off < 0 || len < 0 || off + len > b.length || off + len < 0) {
+ throw new IndexOutOfBoundsException
+ ("off < 0 || len < 0 || off+len > b.length || off+len < 0!");
+ }
+
+ bitOffset = 0;
+
+ if (len == 0) {
+ return 0;
+ }
+
+ int nbytes = cache.read(b, off, len);
+ if (nbytes != -1) {
+ streamPos += nbytes;
+ }
+ return nbytes;
+ }
+
+ public void write(int b) throws IOException {
+ flushBits(); // this will call checkClosed() for us
+ cache.write(b);
+ ++streamPos;
+ maxStreamPos = Math.max(maxStreamPos, streamPos);
+ }
+
+ public void write(byte[] b, int off, int len) throws IOException {
+ flushBits(); // this will call checkClosed() for us
+ cache.write(b, off, len);
+ streamPos += len;
+ maxStreamPos = Math.max(maxStreamPos, streamPos);
+ }
+
+ public long length() {
+ try {
+ checkClosed();
+ return cache.length();
+ } catch (IOException e) {
+ return -1L;
+ }
+ }
+
+ /**
+ * Sets the current stream position and resets the bit offset to
+ * 0. It is legal to seek past the end of the file; an
+ * <code>EOFException</code> will be thrown only if a read is
+ * performed. The file length will not be increased until a write
+ * is performed.
+ *
+ * @exception IndexOutOfBoundsException if <code>pos</code> is smaller
+ * than the flushed position.
+ * @exception IOException if any other I/O error occurs.
+ */
+ public void seek(long pos) throws IOException {
+ checkClosed();
+
+ if (pos < flushedPos) {
+ throw new IndexOutOfBoundsException();
+ }
+
+ cache.seek(pos);
+ this.streamPos = cache.getFilePointer();
+ maxStreamPos = Math.max(maxStreamPos, streamPos);
+ this.bitOffset = 0;
+ }
+
+ /**
+ * Returns <code>true</code> since this
+ * <code>ImageOutputStream</code> caches data in order to allow
+ * seeking backwards.
+ *
+ * @return <code>true</code>.
+ *
+ * @see #isCachedMemory
+ * @see #isCachedFile
+ */
+ public boolean isCached() {
+ return true;
+ }
+
+ /**
+ * Returns <code>true</code> since this
+ * <code>ImageOutputStream</code> maintains a file cache.
+ *
+ * @return <code>true</code>.
+ *
+ * @see #isCached
+ * @see #isCachedMemory
+ */
+ public boolean isCachedFile() {
+ return true;
+ }
+
+ /**
+ * Returns <code>false</code> since this
+ * <code>ImageOutputStream</code> does not maintain a main memory
+ * cache.
+ *
+ * @return <code>false</code>.
+ *
+ * @see #isCached
+ * @see #isCachedFile
+ */
+ public boolean isCachedMemory() {
+ return false;
+ }
+
+ /**
+ * Closes this <code>FileCacheImageOututStream</code>. All
+ * pending data is flushed to the output,...
[truncated message content] |