本文整理汇总了Java中com.arellomobile.mvp.InjectViewState类的典型用法代码示例。如果您正苦于以下问题:Java InjectViewState类的具体用法?Java InjectViewState怎么用?Java InjectViewState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InjectViewState类属于com.arellomobile.mvp包,在下文中一共展示了InjectViewState类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getViewClassFromAnnotationParams
import com.arellomobile.mvp.InjectViewState; //导入依赖的package包/类
private String getViewClassFromAnnotationParams(TypeElement typeElement) {
InjectViewState annotation = typeElement.getAnnotation(InjectViewState.class);
String mvpViewClassName = "";
if (annotation != null) {
TypeMirror value = null;
try {
annotation.view();
} catch (MirroredTypeException mte) {
value = mte.getTypeMirror();
}
mvpViewClassName = Util.getFullClassName(value);
}
if (mvpViewClassName.isEmpty() || DefaultView.class.getName().equals(mvpViewClassName)) {
return null;
}
return mvpViewClassName;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:22,代码来源:ViewStateProviderClassGenerator.java
示例2: getViewStateClassFromAnnotationParams
import com.arellomobile.mvp.InjectViewState; //导入依赖的package包/类
private String getViewStateClassFromAnnotationParams(TypeElement typeElement) {
InjectViewState annotation = typeElement.getAnnotation(InjectViewState.class);
String mvpViewStateClassName = "";
if (annotation != null) {
TypeMirror value;
try {
annotation.value();
} catch (MirroredTypeException mte) {
value = mte.getTypeMirror();
mvpViewStateClassName = value.toString();
}
}
if (mvpViewStateClassName.isEmpty() || DefaultViewState.class.getName().equals(mvpViewStateClassName)) {
return null;
}
return mvpViewStateClassName;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:ViewStateProviderClassGenerator.java
示例3: throwableProcess
import com.arellomobile.mvp.InjectViewState; //导入依赖的package包/类
private boolean throwableProcess(RoundEnvironment roundEnv) {
checkInjectors(roundEnv, InjectPresenter.class, new PresenterInjectorRules(ElementKind.FIELD, Modifier.PUBLIC, Modifier.DEFAULT));
ViewStateProviderClassGenerator viewStateProviderClassGenerator = new ViewStateProviderClassGenerator();
PresenterBinderClassGenerator presenterBinderClassGenerator = new PresenterBinderClassGenerator();
processInjectors(roundEnv, InjectViewState.class, ElementKind.CLASS, viewStateProviderClassGenerator);
processInjectors(roundEnv, InjectPresenter.class, ElementKind.FIELD, presenterBinderClassGenerator);
ViewStateClassGenerator viewStateClassGenerator = new ViewStateClassGenerator();
Set<TypeElement> usedViews = viewStateProviderClassGenerator.getUsedViews();
for (TypeElement usedView : usedViews) {
generateCode(ElementKind.INTERFACE, viewStateClassGenerator, usedView);
}
String moxyReflector = MoxyReflectorGenerator.generate(viewStateProviderClassGenerator.getPresenterClassNames(), presenterBinderClassGenerator.getPresentersContainers(), viewStateClassGenerator.getStrategyClasses());
ClassGeneratingParams classGeneratingParams = new ClassGeneratingParams();
classGeneratingParams.setName("com.arellomobile.mvp.MoxyReflector");
classGeneratingParams.setBody(moxyReflector);
createSourceFile(classGeneratingParams);
return true;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:26,代码来源:MvpCompiler.java
示例4: getSupportedAnnotationTypes
import com.arellomobile.mvp.InjectViewState; //导入依赖的package包/类
@Override
public Set<String> getSupportedAnnotationTypes() {
Set<String> supportedAnnotationTypes = new HashSet<>();
Collections.addAll(supportedAnnotationTypes, InjectPresenter.class.getCanonicalName(), InjectViewState.class.getCanonicalName(), GenerateViewState.class.getCanonicalName());
return supportedAnnotationTypes;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:MvpCompiler.java
注:本文中的com.arellomobile.mvp.InjectViewState类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论