feat(jdk8): move files to new folder to avoid resources compiled.

This commit is contained in:
2025-09-07 15:25:52 +08:00
parent 3f0047bf6f
commit 8c35cfb1c0
17415 changed files with 217 additions and 213 deletions

View File

@@ -0,0 +1,89 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.java.browser.dom;
public class DOMAccessException extends Exception
{
/**
* Constructs a new DOMAccessException with no detail message.
*/
public DOMAccessException()
{
this(null, null);
}
/**
* Constructs a new DOMAccessException with the given detail message.
*
* @param msg Detail message.
*/
public DOMAccessException(String msg)
{
this(null, msg);
}
/**
* Constructs a new DOMAccessException with the given exception as a root clause.
*
* @param e Exception.
*/
public DOMAccessException(Exception e)
{
this(e, null);
}
/**
* Constructs a new DOMAccessException with the given exception as a root clause and the given detail message.
*
* @param e Exception.
* @param msg Detail message.
*/
public DOMAccessException(Exception e, String msg)
{
this.ex = e;
this.msg = msg;
}
/**
* Returns the detail message of the error or null if there is no detail message.
*/
public String getMessage()
{
return msg;
}
/**
* Returns the root cause of the error or null if there is none.
*/
public Throwable getCause()
{
return ex;
}
private Throwable ex;
private String msg;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.java.browser.dom;
public interface DOMAccessor
{
/**
* Returns the Document object of the DOM.
*/
public org.w3c.dom.Document getDocument(Object obj) throws org.w3c.dom.DOMException;
/**
* Returns a DOMImplementation object.
*/
public org.w3c.dom.DOMImplementation getDOMImplementation();
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.java.browser.dom;
public interface DOMAction
{
/**
* When an object implementing interface DOMAction is passed
* to DOMService.invokeAndWait() or DOMService.invokeLater(),
* run method is called in the DOM access dispatch thread.
*
* accessor is used for the DOMAction to access the entry point of
* the browser's DOM, if necessary.
*
* @param accessor DOMAccessor
*/
public Object run(DOMAccessor accessor);
}

View File

@@ -0,0 +1,103 @@
/*
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.java.browser.dom;
public abstract class DOMService
{
/**
* Returns new instance of a DOMService. The implementation
* of the DOMService returns depends on the setting of the
* com.sun.java.browser.dom.DOMServiceProvider property or,
* if the property is not set, a platform specific default.
*
* Throws DOMUnsupportedException if the DOMService is not
* available to the obj.
*
* @param obj Object to leverage the DOMService
*/
public static DOMService getService(Object obj)
throws DOMUnsupportedException
{
try
{
String provider = (String) java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("com.sun.java.browser.dom.DOMServiceProvider"));
Class clazz = DOMService.class.forName("sun.plugin.dom.DOMService");
return (DOMService) clazz.newInstance();
}
catch (Throwable e)
{
throw new DOMUnsupportedException(e.toString());
}
}
/**
* An empty constructor is provided. Implementations of this
* abstract class must provide a public no-argument constructor
* in order for the static getService() method to work correctly.
* Application programmers should not be able to directly
* construct implementation subclasses of this abstract subclass.
*/
public DOMService()
{
}
/**
* Causes action.run() to be executed synchronously on the
* DOM action dispatching thread. This call will block until all
* pending DOM actions have been processed and (then)
* action.run() returns. This method should be used when an
* application thread needs to access the browser's DOM.
* It should not be called from the DOMActionDispatchThread.
*
* Note that if the DOMAction.run() method throws an uncaught
* exception (on the DOM action dispatching thread), it's caught
* and re-thrown, as an DOMAccessException, on the caller's thread.
*
* If the DOMAction.run() method throws any DOM security related
* exception (on the DOM action dispatching thread), it's caught
* and re-thrown, as an DOMSecurityException, on the caller's thread.
*
* @param action DOMAction.
*/
public abstract Object invokeAndWait(DOMAction action) throws DOMAccessException;
/**
* Causes action.run() to be executed asynchronously on the
* DOM action dispatching thread. This method should be used
* when an application thread needs to access the browser's
* DOM. It should not be called from the DOMActionDispatchThread.
*
* Note that if the DOMAction.run() method throws an uncaught
* exception (on the DOM action dispatching thread), it will not be
* caught and re-thrown on the caller's thread.
*
* @param action DOMAction.
*/
public abstract void invokeLater(DOMAction action);
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.java.browser.dom;
public abstract class DOMServiceProvider
{
/**
* An empty constructor is provided. Implementations should
* provide a public constructor so that the DOMService
* can instantiate instances of the implementation class.
* Application programmers should not be able to directly
* construct implementation subclasses of this abstract subclass.
* The only way an application should be able to obtain a
* reference to a DOMServiceProvider implementation
* instance is by using the appropriate methods of the
* DOMService.
*/
public DOMServiceProvider()
{
}
/**
* Returns true if the DOMService can determine the association
* between the obj and the underlying DOM in the browser.
*/
public abstract boolean canHandle(Object obj);
/**
* Returns the Document object of the DOM.
*/
public abstract org.w3c.dom.Document getDocument(Object obj) throws DOMUnsupportedException;
/**
* Returns the DOMImplemenation object of the DOM.
*/
public abstract org.w3c.dom.DOMImplementation getDOMImplementation();
}

View File

@@ -0,0 +1,89 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.java.browser.dom;
public class DOMUnsupportedException extends Exception
{
/**
* Constructs a new DOMUnsupportedException with no detail message.
*/
public DOMUnsupportedException()
{
this(null, null);
}
/**
* Constructs a new DOMUnsupportedException with the given detail message.
*
* @param msg Detail message.
*/
public DOMUnsupportedException(String msg)
{
this(null, msg);
}
/**
* Constructs a new DOMUnsupportedException with the given exception as a root clause.
*
* @param e Exception.
*/
public DOMUnsupportedException(Exception e)
{
this(e, null);
}
/**
* Constructs a new DOMUnsupportedException with the given exception as a root clause and the given detail message.
*
* @param e Exception.
* @param msg Detail message.
*/
public DOMUnsupportedException(Exception e, String msg)
{
this.ex = e;
this.msg = msg;
}
/**
* Returns the detail message of the error or null if there is no detail message.
*/
public String getMessage()
{
return msg;
}
/**
* Returns the root cause of the error or null if there is none.
*/
public Throwable getCause()
{
return ex;
}
private Throwable ex;
private String msg;
}