Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.jdevimpl.bookmarks
Class Bookmark

java.lang.Object
  extended by oracle.jdevimpl.bookmarks.Bookmark
All Implemented Interfaces:
Copyable

public final class Bookmark
extends java.lang.Object
implements Copyable

The Bookmark class is the data class for storing info about a bookmark - specifically, what file it is in, and the line the bookmark is on. It is also used for persisting code editor bookmarks across JDeveloper sessions.


Constructor Summary
Bookmark()
          Construct a new default Bookmark instance.
Bookmark(java.net.URL url, int line)
          Construct a new Bookmark instance with the given url and line number.
 
Method Summary
 java.lang.Object copyTo(java.lang.Object target)
          Copies the internal state of this object to the specified copy.
 java.lang.String getDescription()
          Fetch the bookmark description
 int getLine()
          Fetch the line that this bookmark is in.
 int getNumber()
          Fetch the bookmark number
 java.net.URL getURL()
          Fetch the URL that this bookmark is in.
 boolean matches(java.net.URL url)
          Utility method which compares the specified url to see if it matches our bookmark url.
 boolean matches(java.net.URL url, int line)
          Utility method which compares the specified url and line number to see if it matches our bookmark values.
 void setDescription(java.lang.String description)
          Sets the bookmark description.
 void setLine(int line)
          Sets the line that this bookmark is in.
 void setNumber(int number)
          Sets the bookmark number.
 void setURL(java.net.URL url)
          Sets the URL that this bookmark is in.
 java.lang.String toString()
          Render a human-readable version of this object into a String for debugging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Bookmark

public Bookmark()
Construct a new default Bookmark instance.


Bookmark

public Bookmark(java.net.URL url,
                int line)
Construct a new Bookmark instance with the given url and line number.

Parameters:
url - the url for the bookmark
line - the line number of the bookmark
Method Detail

toString

public java.lang.String toString()
Render a human-readable version of this object into a String for debugging purposes.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this object

matches

public boolean matches(java.net.URL url,
                       int line)
Utility method which compares the specified url and line number to see if it matches our bookmark values.

Parameters:
url - the url to compare against
line - the line number to compare against
Returns:
true if our bookmark matches the specified values

matches

public boolean matches(java.net.URL url)
Utility method which compares the specified url to see if it matches our bookmark url.

Parameters:
url - the url to compare against
Returns:
true if our bookmark matches the specified url

copyTo

public java.lang.Object copyTo(java.lang.Object target)
Copies the internal state of this object to the specified copy.

Specified by:
copyTo in interface Copyable
Parameters:
-
Returns:
The object to which the state of this object was copied. If the target was non-null, then the return value is the same as the target object that was passed in; otherwise, the return value is a new instance of this class.

getURL

public java.net.URL getURL()
Fetch the URL that this bookmark is in.

Returns:
the URL that this bookmark is in

setURL

public void setURL(java.net.URL url)
Sets the URL that this bookmark is in.

Parameters:
url - the URL that this bookmark is in

getLine

public int getLine()
Fetch the line that this bookmark is in.

Returns:
the line that this bookmark is in

setLine

public void setLine(int line)
Sets the line that this bookmark is in.

Parameters:
line - the line that this bookmark is in

getDescription

public java.lang.String getDescription()
Fetch the bookmark description

Returns:
the bookmark description

setDescription

public void setDescription(java.lang.String description)
Sets the bookmark description.

Parameters:
description - the bookmark description

getNumber

public int getNumber()
Fetch the bookmark number

Returns:
the bookmark number

setNumber

public void setNumber(int number)
Sets the bookmark number.

Parameters:
number - the bookmark number

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

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