org.eclipse.xtext.testing.InjectWith的实例源码

项目:solidity-ide    文件InjectorProviders.java   
public static IInjectorProvider getorCreateInjectorProvider(ExtensionContext context) {
    InjectWith injectWith = context.getrequiredTestClass().getAnnotation(InjectWith.class);
    if (injectWith != null) {
        Class<? extends IInjectorProvider> klass = injectWith.value();
        IInjectorProvider injectorProvider = injectorProviderClassCache.get(klass);
        if (injectorProvider == null) {
            try {
                injectorProvider = klass.newInstance();
                injectorProviderClassCache.put(klass,injectorProvider);
            } catch (Exception e) {
                throwUncheckedException(e);
            }
        }
        return injectorProvider;
    }
    return null;
}
项目:xtext-core    文件InjectorProviders.java   
public static IInjectorProvider getorCreateInjectorProvider(TestClass testClass) {
    InjectWith injectWith = testClass.getJavaClass().getAnnotation(InjectWith.class);
    if (injectWith != null) {
        Class<? extends IInjectorProvider> klass = injectWith.value();
        IInjectorProvider injectorProvider = injectorProviderClassCache.get(klass);
        if (injectorProvider == null) {
            try {
                injectorProvider = klass.newInstance();
                injectorProviderClassCache.put(klass,injectorProvider);
            } catch (Exception e) {
                throwUncheckedException(e);
            }
        }
        return injectorProvider;
    }
    return null;
}
项目:solidity-ide    文件InjectorProviders.java   
public static IInjectorProvider getInjectorProvider(ExtensionContext context) {
    InjectWith injectWith = context.getrequiredTestClass().getAnnotation(InjectWith.class);
    if (injectWith != null) {
        return injectorProviderClassCache.get(injectWith.value());
    }
    return null;
}
项目:solidity-ide    文件InjectorProviders.java   
public static IInjectorProvider createInjectorProvider(ExtensionContext context) {
    InjectWith injectWith = context.getrequiredTestClass().getAnnotation(InjectWith.class);
    if (injectWith != null) {
        try {
            return injectWith.value().newInstance();
        } catch (Exception e) {
            throwUncheckedException(e);
        }
    }
    return null;
}
项目:xtext-core    文件InjectorProviders.java   
public static IInjectorProvider getInjectorProvider(TestClass testClass) {
    InjectWith injectWith = testClass.getJavaClass().getAnnotation(InjectWith.class);
    if (injectWith != null) {
        return injectorProviderClassCache.get(injectWith.value());
    }
    return null;
}
项目:xtext-core    文件InjectorProviders.java   
public static IInjectorProvider createInjectorProvider(TestClass testClass) {
    InjectWith injectWith = testClass.getJavaClass().getAnnotation(InjectWith.class);
    if (injectWith != null) {
        try {
            return injectWith.value().newInstance();
        } catch (Exception e) {
            throwUncheckedException(e);
        }
    }
    return null;
}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...