# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
/**
\mainpage
To port the class libraries to a new VM, the VM writer must implement certain
Kernel Java classes to the full Java 1.4.2
API specification. (The VM writer must also implement the documented C
VM Interface which contains the VM entry
points required by other class library natives.)
Kernel Java Classes
The Kernel Java classes are those classes which are tied to the structure of
the VM, or whose structure is known by the VM.
Most of these classes are defined by the Java 1.4.2 API specification. The IBM
VM implementations of these classes are provided in open source. The IBM
implementations rely on the presence of (typically) VM specific natives
to implement the required Java APIs. Other VM writers can choose to use
these implementations, but this forces the writer to use the reference design and
the writer must then implement the natives, for which minimal documentation
is provided.
All but one of the kernel classes are defined by the public Java 1.4.2 API.
These classes, described further in the
doxygen class list, belong to the
following packages:
- java.lang
- java.lang.reflect
- java.lang.ref
- java.security
The other class is in the org.apache.harmony.kernel.vm
package.
Some of the documented classes must be entirely implemented by the VM writer.
For other classes the implementation is mostly provided. Some classes are documented
so the implementation details can be used by the VM writer. Below is a summary of
all the Kernel classes.
Kernel Class Details
The VM writer is expected to entirely implement the classes below. A small number
of non-public methods must be implemented in these classes to support other
classes (such as java.lang.SecurityManager)
as documented in the method descriptions.
- java.lang.Object
- java.lang.Class
- java.lang.ClassLoader
- java.lang.Compiler
- java.lang.Package
- java.lang.Runtime
- java.lang.Thread
- java.lang.reflect.AccessibleObject
- java.lang.reflect.Constructor
- java.lang.reflect.Field
- java.lang.reflect.Method
- java.lang.reflect.Array
- java.lang.ref.Reference (PhantomReference, SoftReference, WeakReference)
The implementation of org.apache.harmony.kernel.vm.VM must
be provided by the VM writer. This class provides class loading and stack walking methods
that are not available in the public Java API such as a method which enables its caller to
obtain the caller's class loader. This class also provides an intern(String) method, which
the intern() method of the String implementation in Harmony will call.
The class org.apache.harmony.luni.internal.process.SystemProcess
is implemented, but is documented so the VM writer can use this class to implement
java.lang.Runtime.exec().
The class java.lang.ref.ReferenceQueue is
implemented, but is documented so the VM writer can use the non-public fields and methods
in the implementation of
java.lang.ref.Reference and its subclasses.
The following classes are implemented, but require a small number of methods to be
implemented by the VM writer to complete the implementation. Alternatively, the VM
writer can provide their own implementations of these classes.
- java.lang.Throwable
- java.security.AccessControlContext
- java.security.AccessController
The class java.lang.StackTraceElement is
implemented, but is documented so the VM writer can use the non-public fields and methods
in the implementation of java.lang.Throwable.
The implementation of java.lang.ThreadGroup
is provided. Certain non-public methods are documented as they are used by the VM when
booting the class libraries.
*/