Skip navigation links
oracle.jdeveloper.model
Class JavaSourceNode
java.lang.Object
oracle.ide.model.Node
oracle.ide.model.TextNode
oracle.ide.model.DeployableTextNode
oracle.jdeveloper.model.JavaNode
oracle.jdeveloper.model.JavaSourceNode
- All Implemented Interfaces:
- Displayable, Element, LazyLoadable, Locatable, Subject, Dirtyable, PackagedSource
-
public final class JavaSourceNode
- extends JavaNode
- implements PackagedSource
The JavaSourceNode
interface represents a Java source file in the JDeveloper browser. In addition to providing the services supported by the JavaNode
interface, the JavaSourceNode
interface provides access to a source view of the file through the JOT subystem.
Field Summary |
static java.lang.String |
defaultName
|
static java.lang.String |
EXT
|
static java.lang.String |
SQLJ_EXT
|
Method Summary |
protected void |
closeImpl()
Subclasses should override this method to customize the close() behavior. |
java.lang.String |
getPackage()
|
java.lang.String |
getPackage(Project project)
Returns the package for the source file. |
java.lang.String |
getSourceFile()
Returns the file name for the source file. |
boolean |
isSqlj()
|
oracle.javatools.parser.java.v1.symbol.RootSymbol |
parse1()
Deprecated. Use oracle.jdeveloper.java.JavaManager and oracle.jdeveloper.java.JavaModel for access to a Java Model of any source in a project. |
oracle.javatools.parser.java.v1.symbol.RootSymbol |
parse1(boolean fullDepth)
Deprecated. Use oracle.jdeveloper.java.JavaManager and oracle.jdeveloper.java.JavaModel for access to a Java Model of any source in a project. |
Methods inherited from class oracle.ide.model.TextNode |
acquireTextBuffer, acquireTextBufferOrThrow, addTextBufferListener, createOutputStreamWriter, createReader, getInputStream, getInputStream, getLoadEncoding, getReader, getSaveEncoding, getTextBufferDirectly, hasEmptyTextBuffer, isDirty, isReadOnly, markDirty, markDirtyImpl, openImpl, readUnlock, releaseTextBuffer, removeTextBufferListener, reportOpenException, revertImpl, saveImpl, setDefaultLineTerminator, setLoadEncoding, setSaveEncoding, tryAcquireTextBuffer, upgradeUnlock, urlReadOnlyChanged, writeUnlock |
Methods inherited from class oracle.ide.model.Node |
addNodeListener, addNodeListenerForType, addNodeListenerForTypeHierarchy, attach, beginThreadNodeUsageCycle, callUnderReadLock, callUnderWriteLock, close, createSubject, delete, deleteImpl, detach, endThreadNodeUsage, endThreadNodeUsageCycle, ensureOpen, equalsImpl, getAttributes, getChildren, getData, getLongLabel, getShortLabel, getSubject, getTimestamp, getTimestampLoadedUnsafe, getToolTipText, getTransientProperties, getUnmodifiedTimestamp, getURL, isLoaded, isMigrating, isNew, isOpen, isReadLocked, isReadOrWriteLocked, isTrackedInNodeCache, isWriteLocked, lockCount, mayHaveChildren, nodeLock, notifyObservers, open, readLock, readLockCount, refreshTimestamp, removeNodeListener, removeNodeListenerForType, removeNodeListenerForTypeHierarchy, rename, renameImpl, revert, runUnderReadLock, runUnderWriteLock, save, setEventLog, setMigrating, setOpen, setReadOnly, setTimestampDirectly, setURL, toString, tryRunUnderReadLock, tryRunUnderWriteLock, unsetMigrating, upgradeLock, writeLock, writeLockCount |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EXT
public static final java.lang.String EXT
-
- See Also:
- Constant Field Values
SQLJ_EXT
public static final java.lang.String SQLJ_EXT
-
- See Also:
- Constant Field Values
defaultName
public static final java.lang.String defaultName
JavaSourceNode
public JavaSourceNode()
closeImpl
protected void closeImpl()
throws java.io.IOException
- Description copied from class:
Node
- Subclasses should override this method to customize the close() behavior.
Node.close()
invokes this only if the node is open, under write lock. The Node
implementation does nothing.
-
- Overrides:
closeImpl
in class TextNode
-
- Throws:
java.io.IOException
- if an I/O error occurred while closing
isSqlj
public boolean isSqlj()
-
- Returns:
true
if this JavaSourceNode represents a SQLJ source file; false
if it's a regular Java source file.
getPackage
public java.lang.String getPackage()
getPackage
public java.lang.String getPackage(Project project)
- Description copied from interface:
PackagedSource
- Returns the package for the source file.
-
- Specified by:
getPackage
in interface PackagedSource
-
- Parameters:
project
- the project which contains the source file
- Returns:
- the package for the source file.
getSourceFile
public java.lang.String getSourceFile()
- Description copied from interface:
PackagedSource
- Returns the file name for the source file.
In the case of a normal Java file, this method should return the source file attribute, defined as the following: Only the name of the source file is given by the source file attribute it never represents the name of a directory containing the file or an absolute path name for the file. For instance the source file attribute may contain file name foo.java
but not the UNIX path name /home/jdevwork/workspace1/project1/package1/foo.java.
-
- Specified by:
getSourceFile
in interface PackagedSource
-
- Returns:
- the source file name for the source file.
parse1
@Deprecated
public oracle.javatools.parser.java.v1.symbol.RootSymbol parse1(boolean fullDepth)
- Deprecated. Use oracle.jdeveloper.java.JavaManager and oracle.jdeveloper.java.JavaModel for access to a Java Model of any source in a project.
- Parses the Java code contained within this JavaSourceNode. If a full-depth parse is requested, a full-depth parse tree will be returned. If a only a members-depth parse is requested, but a full-depth parse tree is already available, the full-depth parse tree will be returned.
-
- Parameters:
fullDepth
- Request full-depth.
- Returns:
- the RootSymbol resulting from the parse, or null if a valid RootSymbol could not be constructed.
parse1
@Deprecated
public oracle.javatools.parser.java.v1.symbol.RootSymbol parse1()
- Deprecated. Use oracle.jdeveloper.java.JavaManager and oracle.jdeveloper.java.JavaModel for access to a Java Model of any source in a project.
- Convenience routine. Gets the full-depth parse tree.
Skip navigation links
Copyright © 1997, 2015, Oracle. All rights reserved.