本文整理了Java中javax.lang.model.util.Types.capture()
方法的一些代码示例,展示了Types.capture()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Types.capture()
方法的具体详情如下:
包路径:javax.lang.model.util.Types
类名称:Types
方法名:capture
[英]Applies capture conversion to a type.
[中]将捕获转换应用于类型。
代码示例来源:origin: com.google.dagger/dagger-compiler
@Override
public TypeMirror capture(TypeMirror t) {
return types.capture(t);
}
代码示例来源:origin: org.vesalainen.bcc/bcc
public static TypeMirror capture(TypeMirror t)
{
return types.capture(t);
}
代码示例来源:origin: org.uberfire/uberfire-workbench-processors
@Override
public TypeMirror capture(TypeMirror arg0) {
return realImpl.capture(arg0);
}
代码示例来源:origin: kiegroup/appformer
@Override
public TypeMirror capture(TypeMirror arg0) {
return realImpl.capture(arg0);
}
代码示例来源:origin: sk.seges.sesam/sesam-annotation-core-support
@Override
public TypeMirror capture(TypeMirror t) {
return this.types.capture(t);
}
代码示例来源:origin: domaframework/doma
public TypeMirror capture(TypeMirror t) {
return typeUtils.capture(t);
}
代码示例来源:origin: org.mapstruct/mapstruct-processor
@Override
public TypeMirror capture(TypeMirror t) {
return delegate.capture( t );
}
代码示例来源:origin: juzu/juzu
public TypeMirror capture(TypeMirror t) {
return env.getTypeUtils().capture(t);
}
代码示例来源:origin: org.juzu/juzu-core
public TypeMirror capture(TypeMirror t) {
return env.getTypeUtils().capture(t);
}
代码示例来源:origin: com.progressoft.brix.domino.apt/apt-commons
public String getInterfaceFullQualifiedGenericName(Class<?> targetInterface) {
return typeUtils.capture(getInterfaceType(targetInterface)).toString();
}
代码示例来源:origin: stoicflame/enunciate
public TypeMirror capture(TypeMirror t) {
while (t instanceof DecoratedTypeMirror) {
t = ((DecoratedTypeMirror) t).getDelegate();
}
return TypeMirrorDecorator.decorate(delegate.capture(t), this.env);
}
代码示例来源:origin: com.progressoft.brix.domino.apt/apt-client
private String getRequestPresenter(ProcessorElement element) {
return new FullClassName(typeUtils.capture(element.asTypeElement().getSuperclass()).toString()).allImports()
.get(1);
}
代码示例来源:origin: com.webcohesion.enunciate/enunciate-javac-support
public TypeMirror capture(TypeMirror t) {
while (t instanceof DecoratedTypeMirror) {
t = ((DecoratedTypeMirror) t).getDelegate();
}
return TypeMirrorDecorator.decorate(delegate.capture(t), this.env);
}
代码示例来源:origin: io.ultreia.java4all/java-bean
private String computeSetterMethodParameterType(String className, List<String> formal, Map<String, String> formalMap, ExecutableElement methodElement, Element variableElement) {
if (!methodElement.getTypeParameters().isEmpty() && variableElement.asType().getKind() == TypeKind.TYPEVAR && !formal.contains(variableElement.asType().toString())) {
return processingEnv.getTypeUtils().erasure(variableElement.asType()).toString();
}
String methodType = variableElement.asType().toString();
if (!methodType.contains("<")) {
return methodType;
}
DeclaredType capture = (DeclaredType) processingEnv.getTypeUtils().capture(variableElement.asType());
List<String> formalValues = new LinkedList<>();
boolean use = false;
for (TypeMirror typeArgument : capture.getTypeArguments()) {
String simpleName = typeArgument.toString();
String rawValue = formalMap.get(simpleName);
if (rawValue != null) {
formalValues.add(rawValue);
use = true;
} else {
formalValues.add(typeArgument.toString());
use = true;
}
}
if (use) {
methodType = String.format("%s< %s >", processingEnv.getTypeUtils().erasure(variableElement.asType()).toString(), String.join(", ", formalValues));
}
logDebug(String.format("Class %s - Method Parameterized type: %s", className, methodType));
return methodType;
}
代码示例来源:origin: LuckyJayce/EventBus-Apt
TypeMirror typeMirror = null;
try {
typeMirror = processingEnvironment.getTypeUtils().capture(element.asType());
messager.printMessage(Diagnostic.Kind.NOTE, " processingEnvironment.getTypeUtils().capture(element.asType()):" + typeMirror);
} catch (Exception e) {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-java-completion
type = controller.getTypes().capture(type);
代码示例来源:origin: yongjhih/RetroFacebook
assertTrue(typeMirrorSet.add(one.getReturnType()));
assertFalse(typeMirrorSet.add(two.getReturnType()));
DeclaredType captureOne = (DeclaredType) typeUtil.capture(one.getReturnType());
assertTrue(typeMirrorSet.add(captureOne));
DeclaredType captureTwo = (DeclaredType) typeUtil.capture(two.getReturnType());
assertFalse(typeMirrorSet.add(captureTwo));
代码示例来源:origin: 8tory/SimpleWeibo
assertTrue(typeMirrorSet.add(one.getReturnType()));
assertFalse(typeMirrorSet.add(two.getReturnType()));
DeclaredType captureOne = (DeclaredType) typeUtil.capture(one.getReturnType());
assertTrue(typeMirrorSet.add(captureOne));
DeclaredType captureTwo = (DeclaredType) typeUtil.capture(two.getReturnType());
assertFalse(typeMirrorSet.add(captureTwo));
代码示例来源:origin: yongjhih/AutoJson
assertTrue(typeMirrorSet.add(one.getReturnType()));
assertFalse(typeMirrorSet.add(two.getReturnType()));
DeclaredType captureOne = (DeclaredType) typeUtil.capture(one.getReturnType());
assertTrue(typeMirrorSet.add(captureOne));
DeclaredType captureTwo = (DeclaredType) typeUtil.capture(two.getReturnType());
assertFalse(typeMirrorSet.add(captureTwo));
代码示例来源:origin: yongjhih/RetroFacebook
assertTrue(typeMirrorSet.add(one.getReturnType()));
assertFalse(typeMirrorSet.add(two.getReturnType()));
DeclaredType captureOne = (DeclaredType) typeUtil.capture(one.getReturnType());
assertTrue(typeMirrorSet.add(captureOne));
DeclaredType captureTwo = (DeclaredType) typeUtil.capture(two.getReturnType());
assertFalse(typeMirrorSet.add(captureTwo));
内容来源于网络,如有侵权,请联系作者删除!