org.eclipse.emf.java.util
Class JavaPackageResourceImpl
java.lang.Object
org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.NotifierImpl
org.eclipse.emf.ecore.resource.impl.ResourceImpl
org.eclipse.emf.java.util.JavaPackageResourceImpl
- All Implemented Interfaces:
- Notifier, Resource, Resource.Internal
public class JavaPackageResourceImpl
- extends ResourceImpl
Field Summary |
protected java.lang.ClassLoader |
classLoader
|
protected java.util.List<java.lang.String> |
sourceURIs
|
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
contents, defaultDeleteOptions, defaultLoadOptions, defaultSaveOptions, errors, intrinsicIDToEObjectMap, isLoaded, isLoading, isModified, modificationTrackingAdapter, resourceSet, timeStamp, unloadingContents, uri, warnings |
Method Summary |
protected JClass |
demandLoad(java.lang.String packageName,
java.lang.String typeName)
|
protected void |
doLoad(java.io.InputStream inputStream,
java.util.Map<?,?> options)
Called to load the resource. |
protected void |
doSave(java.io.OutputStream outputStream,
java.util.Map<?,?> options)
Called to save the resource. |
java.lang.ClassLoader |
getClassLoader()
|
protected EObject |
getEObject(java.util.List<java.lang.String> uriFragmentPath)
Returns the object based on the fragment path as a list of Strings. |
EObject |
getEObject(java.lang.String uriFragment)
Returns the resolved object for the given URI fragment . |
protected EObject |
getEObjectForURIFragmentRootSegment(java.lang.String uriFragmentRootSegment)
Returns the object associated with the URI fragment root segment. |
java.util.List<java.lang.String> |
getSourceURIs()
|
void |
setClassLoader(java.lang.ClassLoader classLoader)
|
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
addModificationTrackingAdapters, attached, attachedHelper, basicSetResourceSet, createModificationTrackingAdapter, delete, detached, detachedHelper, doUnload, getAllContents, getAllProperContents, getAllProperContents, getContents, getDefaultURIConverter, getEObjectByID, getErrors, getIntrinsicIDToEObjectMap, getResourceSet, getTimeStamp, getURI, getURIConverter, getURIFragment, getURIFragmentRootSegment, getWarnings, isAttachedDetachedHelperRequired, isContentZipEntry, isLoaded, isLoading, isModified, isTrackingModification, load, load, mergeMaps, newContentZipEntry, removeModificationTrackingAdapters, save, save, saveOnlyIfChangedWithFileBuffer, saveOnlyIfChangedWithMemoryBuffer, setIntrinsicIDToEObjectMap, setLoaded, setModified, setTimeStamp, setTrackingModification, setURI, toKeyString, toString, unload, unloaded, useZip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
classLoader
protected java.lang.ClassLoader classLoader
sourceURIs
protected java.util.List<java.lang.String> sourceURIs
JavaPackageResourceImpl
public JavaPackageResourceImpl(URI uri)
doLoad
protected void doLoad(java.io.InputStream inputStream,
java.util.Map<?,?> options)
throws java.io.IOException
- Description copied from class:
ResourceImpl
- Called to load the resource.
This implementation throws an exception;
clients must override it.
- Overrides:
doLoad
in class ResourceImpl
- Parameters:
inputStream
- the streamoptions
- the load options.
- Throws:
java.io.IOException
doSave
protected void doSave(java.io.OutputStream outputStream,
java.util.Map<?,?> options)
throws java.io.IOException
- Description copied from class:
ResourceImpl
- Called to save the resource.
This implementation throws an exception;
clients must override it.
- Overrides:
doSave
in class ResourceImpl
- Parameters:
outputStream
- the streamoptions
- the save options.
- Throws:
java.io.IOException
getEObject
public EObject getEObject(java.lang.String uriFragment)
- Description copied from interface:
Resource
- Returns the resolved object for the given URI
fragment
.
The fragment encoding will typically be that produced by getURIFragment
.
- Specified by:
getEObject
in interface Resource
- Overrides:
getEObject
in class ResourceImpl
- Parameters:
uriFragment
- the fragment to resolve.
- Returns:
- the resolved object for the given fragment, or
null
if it can't be resolved. - See Also:
Resource.getURIFragment(EObject)
,
ResourceSet.getEObject(URI, boolean)
,
EcoreUtil.resolve(EObject, ResourceSet)
,
InternalEObject.eObjectForURIFragmentSegment(String)
getEObjectForURIFragmentRootSegment
protected EObject getEObjectForURIFragmentRootSegment(java.lang.String uriFragmentRootSegment)
- Description copied from class:
ResourceImpl
- Returns the object associated with the URI fragment root segment.
This default implementation uses the position of the object;
an empty string is the same as
"0"
.
- Overrides:
getEObjectForURIFragmentRootSegment
in class ResourceImpl
- Returns:
- the object associated with the URI fragment root segment.
getEObject
protected EObject getEObject(java.util.List<java.lang.String> uriFragmentPath)
- Description copied from class:
ResourceImpl
- Returns the object based on the fragment path as a list of Strings.
- Overrides:
getEObject
in class ResourceImpl
demandLoad
protected JClass demandLoad(java.lang.String packageName,
java.lang.String typeName)
getClassLoader
public java.lang.ClassLoader getClassLoader()
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
getSourceURIs
public java.util.List<java.lang.String> getSourceURIs()