return element.accept( new ElementKindVisitor8<Boolean, Void>( Boolean.FALSE ) {
/** * Annotation processor entry point, we are using a visitor pattern the visit * only the class declaration. */ @Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { ListClassVisitor listClassVisitor = new ListClassVisitor(); Collection<TypeElement> classes = new ArrayList<TypeElement>(); filterClasses(classes, roundEnv.getRootElements()); for (TypeElement typeDecl : classes) typeDecl.accept(listClassVisitor, null); for (ServiceFileInfo info : serviceFiles.values()) { if (info.isDirty()) { if (debug) { printNote("Creating META-INF/services " + info.getServiceName() + " file"); } PrintWriter writer = new PrintWriter(info.getWriter()); for (String implementor : info.getImplementors()) { if (debug) { printNote(" Implementor " + implementor); } writer.println(implementor); } writer.close(); } } return true; }
private void inspectEndpointInterface(String endpointInterfaceName, TypeElement d) { TypeElement intTypeElement = getEndpointInterfaceElement(endpointInterfaceName, d); if (intTypeElement != null) intTypeElement.accept(this, null); }
private void inspectEndpointInterface(String endpointInterfaceName, TypeElement d) { TypeElement intTypeElement = getEndpointInterfaceElement(endpointInterfaceName, d); if (intTypeElement != null) intTypeElement.accept(this, null); }
private void inspectEndpointInterface(String endpointInterfaceName, TypeElement d) { TypeElement intTypeElement = getEndpointInterfaceElement(endpointInterfaceName, d); if (intTypeElement != null) intTypeElement.accept(this, null); }
private void inspectEndpointInterface(String endpointInterfaceName, TypeElement d) { TypeElement intTypeElement = getEndpointInterfaceElement(endpointInterfaceName, d); if (intTypeElement != null) intTypeElement.accept(this, null); }
@Override public void contribute(RequestHandlerMethodInfo handlerMethod, ActionTemplateBuilder action) { VariableElement requestBodyParameter = handlerMethod.getRequestBodyParameter(); if (requestBodyParameter != null) { TypeMirror requestBodyTypeMirror = requestBodyParameter.asType(); if (requestBodyTypeMirror.getKind() == TypeKind.DECLARED) { TypeElement requestBodyType = (TypeElement) types.asElement(requestBodyTypeMirror); requestBodyType.accept(new Scanner(), action); } } }
/** * Visits the superclass and interfaces of the specified * TypeElement with a ContractExtensionBuilder. */ protected void scanSuper(TypeElement e) { TypeElement superElement = (TypeElement) utils.typeUtils.asElement(e.getSuperclass()); if (superElement != null) { superElement.accept(new ContractExtensionBuilder(), type); } for (TypeMirror iface : e.getInterfaces()) { TypeElement ifaceElement = (TypeElement) utils.typeUtils.asElement(iface); ifaceElement.accept(new ContractExtensionBuilder(), type); } } }
supElem.accept(this, null);
/** * Returns a {@link TypeModel} instance representing the specified * {@link TypeElement}. */ @Requires({ "element != null", "diagnosticManager != null" }) @Ensures({ "result != null", "result.getName().getQualifiedName()" + ".equals(element.getQualifiedName().toString())" }) TypeModel createType(TypeElement element, DiagnosticManager diagnosticManager) { String name = utils.elementUtils.getBinaryName(element) .toString().replace('.', '/'); TypeBuilder visitor = new TypeBuilder(utils, sourceDependencyLoader, diagnosticManager); element.accept(visitor, null); return visitor.getType(); } }
r.accept(visitor, null);
/** * Annotation processor entry point, we are using a visitor pattern the visit * only the class declaration. */ @Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { ListClassVisitor listClassVisitor = new ListClassVisitor(); Collection<TypeElement> classes = new ArrayList<TypeElement>(); filterClasses(classes, roundEnv.getRootElements()); for (TypeElement typeDecl : classes) typeDecl.accept(listClassVisitor, null); for (ServiceFileInfo info : serviceFiles.values()) { if (info.isDirty()) { if (debug) { printNote("Creating META-INF/services " + info.getServiceName() + " file"); } PrintWriter writer = new PrintWriter(info.getWriter()); for (String implementor : info.getImplementors()) { if (debug) { printNote(" Implementor " + implementor); } writer.println(implementor); } writer.close(); } } return true; }
element.accept(webServiceVisitor, null); processedEndpoint = true;
element.accept(webServiceVisitor, null); processedEndpoint = true;
element.accept(webServiceVisitor, null); processedEndpoint = true;
element.accept(webServiceVisitor, null); processedEndpoint = true;
clazz.accept(this, null);
clazz.accept(this, null);