本文整理了Java中org.robolectric.util.Logger.strict()
方法的一些代码示例,展示了Logger.strict()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.strict()
方法的具体详情如下:
包路径:org.robolectric.util.Logger
类名称:Logger
方法名:strict
暂无
代码示例来源:origin: robolectric/robolectric
private void strictError(String message, Object... args) {
if (strictErrors) {
throw new RuntimeException(String.format(message, args));
} else {
Logger.strict(message, args);
}
}
代码示例来源:origin: robolectric/robolectric
private static URL[] parseJavaClassPath() {
ImmutableList.Builder<URL> urls = ImmutableList.builder();
for (String entry : Splitter.on(PATH_SEPARATOR.value()).split(JAVA_CLASS_PATH.value())) {
try {
try {
urls.add(new File(entry).toURI().toURL());
} catch (SecurityException e) { // File.toURI checks to see if the file is a directory
urls.add(new URL("file", null, new File(entry).getAbsolutePath()));
}
} catch (MalformedURLException e) {
Logger.strict("malformed classpath entry: " + entry, e);
}
}
return urls.build().toArray(new URL[0]);
}
代码示例来源:origin: robolectric/robolectric
/**
* Create and register {@link ContentProvider} using {@link ProviderInfo} found from manifest.
*/
public ContentProviderController<T> create() {
Context baseContext = RuntimeEnvironment.application.getBaseContext();
ComponentName componentName = createRelative(baseContext.getPackageName(), contentProvider.getClass().getName());
ProviderInfo providerInfo = null;
try {
providerInfo =
baseContext
.getPackageManager()
.getProviderInfo(componentName, PackageManager.MATCH_DISABLED_COMPONENTS);
} catch (PackageManager.NameNotFoundException e) {
Logger.strict("Unable to find provider info for " + componentName, e);
}
return create(providerInfo);
}
代码示例来源:origin: robolectric/robolectric
break;
default:
Logger.strict("Unsupported string resource escape code '%s'", escapeCode);
代码示例来源:origin: robolectric/robolectric
Logger.strict("couldn't resolve %s from %s", resName.getFullyQualifiedName(), attribute);
return;
} else {
代码示例来源:origin: org.robolectric/shadows-core
private void strictError(String message, Object... args) {
if (strictErrors) {
throw new RuntimeException(String.format(message, args));
} else {
Logger.strict(message, args);
}
}
代码示例来源:origin: org.robolectric/framework
private void strictError(String message, Object... args) {
if (strictErrors) {
throw new RuntimeException(String.format(message, args));
} else {
Logger.strict(message, args);
}
}
代码示例来源:origin: org.robolectric/shadows-core-v23
private void strictError(String message, Object... args) {
if (strictErrors) {
throw new RuntimeException(String.format(message, args));
} else {
Logger.strict(message, args);
}
}
代码示例来源:origin: org.robolectric/shadows-framework
private void strictError(String message, Object... args) {
if (strictErrors) {
throw new RuntimeException(String.format(message, args));
} else {
Logger.strict(message, args);
}
}
代码示例来源:origin: org.robolectric/shadows-framework
/**
* Create and register {@link ContentProvider} using {@link ProviderInfo} found from manifest.
*/
public ContentProviderController<T> create() {
Context baseContext = RuntimeEnvironment.application.getBaseContext();
ComponentName componentName = createRelative(baseContext.getPackageName(), contentProvider.getClass().getName());
ProviderInfo providerInfo = null;
try {
providerInfo = baseContext.getPackageManager().getProviderInfo(componentName, 0);
} catch (PackageManager.NameNotFoundException e) {
Logger.strict("Unable to find provider info for " + componentName, e);
}
return create(providerInfo);
}
代码示例来源:origin: org.robolectric/resources
break;
default:
Logger.strict("Unsupported string resource escape code '%s'", escapeCode);
代码示例来源:origin: org.robolectric/framework
Logger.strict("couldn't resolve %s from %s", resName.getFullyQualifiedName(), attribute);
代码示例来源:origin: org.robolectric/shadows-core
Logger.strict("couldn't resolve %s from %s", resName.getFullyQualifiedName(), attribute);
代码示例来源:origin: org.robolectric/shadows-framework
Logger.strict("couldn't resolve %s from %s", resName.getFullyQualifiedName(), attribute);
return;
} else {
内容来源于网络,如有侵权,请联系作者删除!