public class ClasspathTypeProvider extends AbstractRuntimeJvmTypeProvider
AbstractRuntimeJvmTypeProvider.ClassNotFoundExceptionWithBaseName, AbstractRuntimeJvmTypeProvider.TypeInResourceSetAdapter
AbstractJvmTypeProvider.ClassNameVariants
IJvmTypeProvider.Factory
services
Constructor and Description |
---|
ClasspathTypeProvider(java.lang.ClassLoader classLoader,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IndexedJvmTypeAccess indexedJvmTypeAccess)
Deprecated.
|
ClasspathTypeProvider(java.lang.ClassLoader classLoader,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IndexedJvmTypeAccess indexedJvmTypeAccess,
TypeResourceServices services) |
Modifier and Type | Method and Description |
---|---|
protected BinaryClassFinder |
createBinaryClassFinder(java.lang.ClassLoader classLoader) |
protected ClassFileBytesAccess |
createClassFileReaderAccess() |
protected ITypeFactory<BinaryClass,JvmDeclaredType> |
createDeclaredTypeFactory(ClassFileBytesAccess readerAccess,
java.lang.ClassLoader classLoader) |
BinaryClassMirror |
createMirror(BinaryClass clazz) |
protected IMirror |
createMirrorForFQN(java.lang.String name) |
TypeResource |
createResource(org.eclipse.emf.common.util.URI uri) |
JvmType |
findTypeByClass(BinaryClass clazz,
org.eclipse.emf.ecore.resource.Resource resource) |
JvmType |
findTypeByName(java.lang.String name)
Find a type by its fully qualified name, e.g.
|
JvmType |
findTypeByName(java.lang.String name,
boolean binaryNestedTypeDelimiter)
Find a type by its fully qualified name, e.g.
|
BinaryClassFinder |
getClassFinder() |
ITypeFactory<BinaryClass,JvmDeclaredType> |
getDeclaredTypeFactory() |
protected void |
registerProtocol(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Also registers an URI converter that can resolve resource URIs that point
to nested types to their outermost declarator.
|
doTryFindInIndex, tryFindTypeInIndex
createMirror, doCreateResource, findNestedType, getIndexedJvmTypeAccess, getResourceSet, isBinaryNestedTypeDelimiter
@Deprecated public ClasspathTypeProvider(java.lang.ClassLoader classLoader, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, IndexedJvmTypeAccess indexedJvmTypeAccess)
ClasspathTypeProvider(ClassLoader, ResourceSet, IndexedJvmTypeAccess, TypeResourceServices)
instead.public ClasspathTypeProvider(java.lang.ClassLoader classLoader, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, IndexedJvmTypeAccess indexedJvmTypeAccess, TypeResourceServices services)
protected ClassFileBytesAccess createClassFileReaderAccess()
protected void registerProtocol(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
registerProtocol
in class AbstractRuntimeJvmTypeProvider
protected BinaryClassFinder createBinaryClassFinder(java.lang.ClassLoader classLoader)
protected ITypeFactory<BinaryClass,JvmDeclaredType> createDeclaredTypeFactory(ClassFileBytesAccess readerAccess, java.lang.ClassLoader classLoader)
public ITypeFactory<BinaryClass,JvmDeclaredType> getDeclaredTypeFactory()
public BinaryClassFinder getClassFinder()
public JvmType findTypeByName(java.lang.String name)
IJvmTypeProvider
java.util.Map$Entry
, int[]
, void
or
java.lang.String[][][]
. Nested class delimiters are expected to be the '$'
. This is fully
equivalent to findTypeByName(name, true)
.findTypeByName
in interface IJvmTypeProvider
findTypeByName
in class AbstractJvmTypeProvider
JvmType
or null if no such type could be found.IJvmTypeProvider.findTypeByName(String, boolean)
public TypeResource createResource(org.eclipse.emf.common.util.URI uri)
createResource
in interface org.eclipse.emf.ecore.resource.Resource.Factory
createResource
in class AbstractJvmTypeProvider
public JvmType findTypeByName(java.lang.String name, boolean binaryNestedTypeDelimiter)
IJvmTypeProvider
java.util.Map.Entry
, int[]
, void
or
java.lang.String[][][]
. If binaryNestedTypeDelimiter
is set to true
, the char '$'
is expected to be delimiter for nested classes. If it is set to false, a char '.'
is assumed to be a
valid nested type delimiter, too.
If the name contains a '$'
, it is assumed to be a class name that uses binary delimiters for nested types.findTypeByName
in interface IJvmTypeProvider
findTypeByName
in class AbstractJvmTypeProvider
JvmType
or null if no such type could be found.IJvmTypeProvider.findTypeByName(String, boolean)
protected IMirror createMirrorForFQN(java.lang.String name)
createMirrorForFQN
in class AbstractJvmTypeProvider
public BinaryClassMirror createMirror(BinaryClass clazz)
public JvmType findTypeByClass(BinaryClass clazz, org.eclipse.emf.ecore.resource.Resource resource)