本文整理汇总了Java中io.fabric.sdk.android.services.concurrency.DependsOn类的典型用法代码示例。如果您正苦于以下问题:Java DependsOn类的具体用法?Java DependsOn怎么用?Java DependsOn使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DependsOn类属于io.fabric.sdk.android.services.concurrency包,在下文中一共展示了DependsOn类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addAnnotatedDependencies
import io.fabric.sdk.android.services.concurrency.DependsOn; //导入依赖的package包/类
void addAnnotatedDependencies(Map<Class<? extends Kit>, Kit> kits, Kit dependentKit) {
DependsOn dependsOn = (DependsOn) dependentKit.getClass().getAnnotation(DependsOn.class);
if (dependsOn != null) {
for (Class<?> dependency : dependsOn.value()) {
if (dependency.isInterface()) {
for (Kit kit : kits.values()) {
if (dependency.isAssignableFrom(kit.getClass())) {
dependentKit.initializationTask.addDependency(kit.initializationTask);
}
}
} else if (((Kit) kits.get(dependency)) == null) {
throw new UnmetDependencyException("Referenced Kit was null, does the kit exist?");
} else {
dependentKit.initializationTask.addDependency(((Kit) kits.get(dependency)).initializationTask);
}
}
}
}
示例2: containsAnnotatedDependency
import io.fabric.sdk.android.services.concurrency.DependsOn; //导入依赖的package包/类
boolean containsAnnotatedDependency(Kit target) {
DependsOn dependsOn = (DependsOn) getClass().getAnnotation(DependsOn.class);
if (dependsOn != null) {
for (Class<?> dep : dependsOn.value()) {
if (dep.equals(target.getClass())) {
return true;
}
}
}
return false;
}
示例3: hasAnnotatedDependency
import io.fabric.sdk.android.services.concurrency.DependsOn; //导入依赖的package包/类
boolean hasAnnotatedDependency() {
return ((DependsOn) getClass().getAnnotation(DependsOn.class)) != null;
}