Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.ide.paths
Class PathInfo

java.lang.Object
  extended by javax.ide.extension.ElementVisitor
      extended by javax.ide.extension.ExtensionHook
          extended by oracle.ide.paths.PathInfo

public final class PathInfo
extends ExtensionHook

Utility for looking up <path-info> elements defined in extension manifests. Putting path information in an extension manifest helps to avoid hard-coded path strings in the source, and keeps them where other extension-related information is located.


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.ide.extension.ExtensionHook
ExtensionHook.URIResource
 
Nested classes/interfaces inherited from class javax.ide.extension.ElementVisitor
ElementVisitor.ResourceBundleProvider
 
Field Summary
static ElementName HOOK_NAME
           
static ElementName PATH_INFO_ELEMENT
           
 
Fields inherited from class javax.ide.extension.ExtensionHook
KEY_EXTENSION, KEY_RSBUNDLE_CLASS, MANIFEST_XMLNS
 
Fields inherited from class javax.ide.extension.ElementVisitor
KEY_LOCATOR
 
Constructor Summary
PathInfo()
           
 
Method Summary
static PathInfo getInstance()
          Get the PathInfo implementation that holds all the loaded Path information
 java.lang.String getPath(java.lang.String pathInfoId)
          Get the path-info specified by pathInfoId.
 java.net.URL getUrl(java.lang.String pathInfoId)
          Get the path-info specified by pathInfoId, and evaluate it into a URL.
 void start(ElementStartContext context)
          Visit the start tag of an xml element.
 
Methods inherited from class javax.ide.extension.ExtensionHook
findPath, getExtension, getProvider, getRSBundleClass, getSchemaLocation, resolvePath, setProvider, setSchemaLocation
 
Methods inherited from class javax.ide.extension.ElementVisitor
end, getAttributeHelper, getClassLoader, getMetaClassLoader, getResourceBundle, getResourceBundleProvider, getTextHelper, log, log, setResourceBundleProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOOK_NAME

public static final ElementName HOOK_NAME

PATH_INFO_ELEMENT

public static final ElementName PATH_INFO_ELEMENT
Constructor Detail

PathInfo

public PathInfo()
Method Detail

getInstance

public static PathInfo getInstance()
Get the PathInfo implementation that holds all the loaded Path information


getUrl

public java.net.URL getUrl(java.lang.String pathInfoId)
                    throws java.lang.IllegalArgumentException
Get the path-info specified by pathInfoId, and evaluate it into a URL. If the path-info value is relative (i.e. it starts with ./ or ../), then the URL is constructed relative to the extension in which it is declared. If the URL is a .jar, then a jar: protocol URL will be returned.

Parameters:
pathInfoId -
Returns:
the path-info's URL
Throws:
java.lang.IllegalArgumentException - if pathInfoId hasn't been registered

getPath

public java.lang.String getPath(java.lang.String pathInfoId)
                         throws java.lang.IllegalArgumentException
Get the path-info specified by pathInfoId. This can be used to build a URL from some known starting point URL.

Parameters:
pathInfoId -
Returns:
the path-info string
Throws:
java.lang.IllegalArgumentException - if pathInfoId hasn't been registered

start

public void start(ElementStartContext context)
Description copied from class: ElementVisitor
Visit the start tag of an xml element.

This implementation does nothing.

Overrides:
start in class ElementVisitor
Parameters:
context - information about the xml start tag.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

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