Extension SDK

oracle.jdeveloper.library
Class JDK

java.lang.Object
  extended byoracle.ide.model.DefaultDisplayable
      extended byoracle.ide.model.DefaultElement
          extended byoracle.ide.model.DataElement
              extended byoracle.jdeveloper.library.JPaths
                  extended byoracle.jdeveloper.library.JDK
All Implemented Interfaces:
Copyable, Data, Dirtyable, Displayable, Element, SubDirtyable, Subject

public class JDK
extends JPaths

Encapsulates the notion of a JDK.


Nested Class Summary
static class JDK.JDKExeFilter
           
 
Field Summary
static java.lang.String JDK_EXEC_PROPERTY
           
static java.lang.String JDK_INSTALLED_VMS_PROPERTY
           
static java.lang.String JDK_NAME_PROPERTY
           
static java.lang.String JDK_SDK_BIN_DIR_PROPERTY
           
static java.lang.String JDK_VERSION_NUMBER_PROPERTY
           
 
Fields inherited from class oracle.jdeveloper.library.JPaths
_isLocked, _owner, CLASSPATH_PROPERTY, DOCPATH_PROPERTY, SOURCEPATH_PROPERTY
 
Fields inherited from interface oracle.ide.addin.Subject
OBJECT_MODIFIED
 
Constructor Summary
JDK()
          Default constructor.
JDK(JDK jdk)
          Copy constructor.
 
Method Summary
 java.lang.Object copyTo(java.lang.Object object)
          Copies the internal state of this object to the specified copy.
protected  void copyToImpl(JDK copy)
           
static JDK createJDK(java.net.URL javaExe)
           
static JDK createJDK(java.net.URL exe, java.lang.String version, java.lang.String clsPath, java.lang.String home)
           
 boolean equals(java.lang.Object o)
           
protected  boolean equalsImpl(JDK otherJDK)
           
 LibraryList getContainingList()
           
 java.lang.String[] getInstalledVMs()
           
 java.net.URL getJavaExecutable()
           
 java.lang.String getJavaExecutableNoConsole()
           
 VersionNumber getJavaVersion()
           
 java.lang.String getName()
           
 java.net.URL getSDKBinDir()
           
 java.lang.String getSDKBinJavaExecutableNoConsole()
           
 java.lang.String getShortLabel()
          Returns a short label that can be displayed to the user.
 void setInstalledVMs(java.lang.String[] installedVMs)
           
 void setJavaExecutable(java.net.URL javaExecutable)
           
 void setJavaVersion(VersionNumber ver)
           
 void setName(java.lang.String name)
           
 void setSDKBinDir(java.net.URL binDir)
           
 
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 oracle.ide.model.DefaultElement
getAttributes, getChildren, getData, mayHaveChildren
 
Methods inherited from class oracle.ide.model.DefaultDisplayable
getIcon, getLongLabel, getToolTipText, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.ide.model.Displayable
getIcon, getLongLabel, getToolTipText, toString
 

Field Detail

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
Constructor Detail

JDK

public JDK()
Default constructor. Required for JavaBean status.


JDK

public JDK(JDK jdk)
Copy constructor.

Method Detail

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()

Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.