Java 类org.eclipse.xtext.common.types.access.impl.ClasspathTypeProvider 实例源码

项目:xtext-extras    文件:JvmTypeReferencesTest.java   
@Before
public void setUp() throws Exception {
    ResourceSet resourceSet = new ResourceSetImpl();
    Resource syntheticResource = new XMLResourceImpl(URI.createURI("http://synthetic.resource"));
    resourceSet.getResources().add(syntheticResource);
    typeProvider = new ClasspathTypeProvider(getClass().getClassLoader(), resourceSet, null, null);
}
项目:xtext-extras    文件:CachingClasspathTypeProviderFactory.java   
@Override
protected ClasspathTypeProvider createClasspathTypeProvider(ResourceSet resourceSet) {
    ClassLoader classLoader = getClassLoader(resourceSet);
    CachingDeclaredTypeFactory actualFactoryToUse = reusedFactory;
    if (!isDefaultClassLoader(classLoader)) {
        actualFactoryToUse = newClassReaderTypeFactory(classLoader);
    }
    return new CachingClasspathTypeProvider(
            classLoader, 
            resourceSet, 
            getIndexedJvmTypeAccess(),
            actualFactoryToUse, services);
}
项目:xtext-extras    文件:ClasspathTypeProviderFactory.java   
@Override
public ClasspathTypeProvider createTypeProvider(ResourceSet resourceSet) {
    if (resourceSet == null)
        throw new IllegalArgumentException("resourceSet may not be null.");
    ClasspathTypeProvider result = createClasspathTypeProvider(resourceSet);
    return result;
}
项目:xtext-extras    文件:StandaloneBuilder.java   
protected void installTypeProvider(final Iterable<String> classPathRoots, final XtextResourceSet resSet, final IndexedJvmTypeAccess typeAccess) {
  final URLClassLoader classLoader = this.createURLClassLoader(classPathRoots);
  new ClasspathTypeProvider(classLoader, resSet, typeAccess, null);
  resSet.setClasspathURIContext(classLoader);
}
项目:xtext-extras    文件:ClasspathTypeProviderFactoryTest.java   
@Test public void testCreateTypeProvider_01() {
    ClasspathTypeProvider typeProvider = factory.createTypeProvider();
    assertNotNull(typeProvider);
    assertNotNull(typeProvider.getResourceSet());
}
项目:xtext-extras    文件:ClasspathTypeProviderFactoryTest.java   
@Test public void testCreateTypeProvider_02() {
    ResourceSet resourceSet = new ResourceSetImpl();
    ClasspathTypeProvider typeProvider = factory.createTypeProvider(resourceSet);
    assertNotNull(typeProvider);
    assertEquals(resourceSet, typeProvider.getResourceSet());
}
项目:xtext-extras    文件:ClasspathTypeProviderFactoryTest.java   
@Test public void testCreateTypeProvider_03() {
    ClasspathTypeProvider typeProvider = factory.createTypeProvider();
    ResourceSet resourceSet = typeProvider.getResourceSet();
    Map<String, Object> map = resourceSet.getResourceFactoryRegistry().getProtocolToFactoryMap();
    assertEquals(typeProvider, map.get(URIHelperConstants.PROTOCOL));
}
项目:xtext-extras    文件:ClasspathTypeProviderFactoryTest.java   
@Test public void testFindTypeProvider_02() {
    ResourceSet resourceSet = new ResourceSetImpl();
    ClasspathTypeProvider typeProvider = factory.createTypeProvider(resourceSet);
    assertSame(typeProvider, factory.findTypeProvider(resourceSet));
}
项目:xtext-extras    文件:JavaReflectAccessTest.java   
@Before
public void setUp() throws Exception {
    resourceSet = new ResourceSetImpl();
    typeProvider = new ClasspathTypeProvider(getClass().getClassLoader(), resourceSet, null, null);
}
项目:xtext-extras    文件:JvmTypeReferencesTest.java   
protected ClasspathTypeProvider getTypeProvider() {
    return typeProvider;
}
项目:xtext-extras    文件:ClasspathBasedTypeScopeProvider.java   
@Override
public ClasspathBasedTypeScope createTypeScope(IJvmTypeProvider typeProvider, Predicate<IEObjectDescription> filter) {
    return new ClasspathBasedTypeScope((ClasspathTypeProvider) typeProvider, qualifiedNameConverter, filter);
}
项目:xtext-extras    文件:ClasspathBasedTypeScope.java   
public ClasspathBasedTypeScope(ClasspathTypeProvider typeProvider, IQualifiedNameConverter qualifiedNameConverter, Predicate<IEObjectDescription> filter) {
    super(typeProvider, qualifiedNameConverter, filter);
}
项目:xtext-extras    文件:ClasspathTypeProviderFactory.java   
protected ClasspathTypeProvider createClasspathTypeProvider(ResourceSet resourceSet) {
    return new ClasspathTypeProvider(getClassLoader(resourceSet), resourceSet, getIndexedJvmTypeAccess(), services);
}
项目:xtext-extras    文件:ClasspathTypeProviderFactory.java   
@Override
public ClasspathTypeProvider createTypeProvider() {
    return (ClasspathTypeProvider) super.createTypeProvider();
}
项目:openhab-hdl    文件:ActionClasspathTypeProviderFactory.java   
@Override
protected ClasspathTypeProvider createClasspathTypeProvider(ResourceSet resourceSet) {
    return new ClasspathTypeProvider(new ActionClassLoader(super.getClassLoader()), resourceSet, getIndexedJvmTypeAccess());
}
项目:openhab-hdl    文件:ActionClasspathBasedTypeScopeProvider.java   
@Override
public ClasspathBasedTypeScope createTypeScope(IJvmTypeProvider typeProvider, Predicate<IEObjectDescription> filter) {
    return new ClasspathBasedTypeScope((ClasspathTypeProvider) typeProvider, qualifiedNameConverter, filter);
}