oracle.jdeveloper.library
Class JDK
java.lang.Object
oracle.ide.model.DefaultDisplayable
oracle.ide.model.DefaultElement
oracle.ide.model.DataElement
oracle.jdeveloper.library.JPaths
oracle.jdeveloper.library.JDK
- All Implemented Interfaces:
- Copyable, Data, Dirtyable, Displayable, Element, SubDirtyable, Subject
- public class JDK
- extends JPaths
Encapsulates the notion of a JDK.
Constructor Summary |
JDK()
Default constructor. |
JDK(JDK jdk)
Copy constructor. |
Methods inherited from class oracle.jdeveloper.library.JPaths |
attach, copyToImpl, detach, equalsImpl, getClassPath, getDocPath, getSourcePath, isDirty, isLocked, markDirty, notifyObservers, setClassPath, setDocPath, setLocked, setOwner, setSourcePath |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JDK_NAME_PROPERTY
public static final java.lang.String JDK_NAME_PROPERTY
-
- See Also:
- Constant Field Values
JDK_SDK_BIN_DIR_PROPERTY
public static final java.lang.String JDK_SDK_BIN_DIR_PROPERTY
-
- See Also:
- Constant Field Values
JDK_INSTALLED_VMS_PROPERTY
public static final java.lang.String JDK_INSTALLED_VMS_PROPERTY
-
- See Also:
- Constant Field Values
JDK_EXEC_PROPERTY
public static final java.lang.String JDK_EXEC_PROPERTY
-
- See Also:
- Constant Field Values
JDK_VERSION_NUMBER_PROPERTY
public static final java.lang.String JDK_VERSION_NUMBER_PROPERTY
-
- See Also:
- Constant Field Values
JDK
public JDK()
- Default constructor. Required for JavaBean status.
JDK
public JDK(JDK jdk)
- Copy constructor.
copyTo
public java.lang.Object copyTo(java.lang.Object object)
- Description copied from interface:
Copyable
- Copies the internal state of
this
object to the specified copy
. If copy
is null
, then this method should create a new instance of this
class and proceed to copy the internal state to the newly created object. Generally, only the persistent state of the object should be copied, but whether or not it is appropriate to copy transient properties is at the discretion of the individual implementor.
Regardless of whether the copy occurs to an existing object or to a newly created object, the return value is object to which this
object's state was copied.
There is a standard implementation pattern for the copyTo
method that helps avoid problems that arise when a Copyable
object is subclassed. The pattern is:
public Object copyTo( Object target )
{
final <this_class> copy =
target != null ? (<this_class>) target : new <this_class>();
copyToImpl( copy );
return copy;
} protected final void copyToImpl( <this_class> copy ) { super.copyToImpl( copy ); // if necessary // put code here for copying the properties of <this_class> }
The parameter passed into the copyToImpl
method is the same type of this
class. The responsibility of copyToImpl
is to copy the state of this
class through direct access of the fields. The copyToImpl
method should not use getters and setters since these may be overridden, causing the state of this
class to be incompletely copied.
-
- Specified by:
copyTo
in interface Copyable
- Overrides:
copyTo
in class JPaths
copyToImpl
protected final void copyToImpl(JDK copy)
equals
public boolean equals(java.lang.Object o)
-
- Overrides:
equals
in class JPaths
equalsImpl
protected boolean equalsImpl(JDK otherJDK)
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
throws java.lang.IllegalStateException
-
- Throws:
java.lang.IllegalStateException
getJavaExecutable
public java.net.URL getJavaExecutable()
setJavaExecutable
public void setJavaExecutable(java.net.URL javaExecutable)
getInstalledVMs
public java.lang.String[] getInstalledVMs()
throws TransientMarker
-
- Throws:
TransientMarker
setInstalledVMs
public void setInstalledVMs(java.lang.String[] installedVMs)
getJavaVersion
public VersionNumber getJavaVersion()
setJavaVersion
public void setJavaVersion(VersionNumber ver)
setSDKBinDir
public void setSDKBinDir(java.net.URL binDir)
getSDKBinDir
public java.net.URL getSDKBinDir()
getSDKBinJavaExecutableNoConsole
public java.lang.String getSDKBinJavaExecutableNoConsole()
getJavaExecutableNoConsole
public java.lang.String getJavaExecutableNoConsole()
getContainingList
public LibraryList getContainingList()
createJDK
public static JDK createJDK(java.net.URL javaExe)
createJDK
public static JDK createJDK(java.net.URL exe,
java.lang.String version,
java.lang.String clsPath,
java.lang.String home)
getShortLabel
public java.lang.String getShortLabel()
- Description copied from interface:
Displayable
- Returns a short label that can be displayed to the user. Generally, the value of the returned
String
is considered translatable and should therefore be placed in an appropriate resource file. When possible, the returned label should be reasonably short enough to show in the navigator or explorer windows but long enough to clearly identify and distinguish the Displayable
.
-
- Specified by:
getShortLabel
in interface Displayable
- Overrides:
getShortLabel
in class DefaultDisplayable
-
- See Also:
Displayable.getShortLabel()
Copyright © 1997, 2004, Oracle. All rights reserved.