Example usage for javax.lang.model.type DeclaredType accept

List of usage examples for javax.lang.model.type DeclaredType accept

Introduction

In this page you can find the example usage for javax.lang.model.type DeclaredType accept.

Prototype

<R, P> R accept(TypeVisitor<R, P> v, P p);

Source Link

Document

Applies a visitor to this type.

Usage

From source file:org.versly.rest.wsdoc.AnnotationProcessor.java

/**
 * Return a JSON type for the given declared type. The caller is responsible for
 * providing a list of concrete types to use to replace parameterized type placeholders.
 *//* w  w w.j ava2  s.  co  m*/
private JsonType jsonTypeForDeclaredType(DeclaredType type, List<? extends TypeMirror> concreteTypes,
        Collection<String> typeRecursionGuard) {

    JsonType jt = _memoizedDeclaredTypes.get(type);
    if (jt == null) {
        TypeVisitorImpl visitor = new TypeVisitorImpl(type, concreteTypes, typeRecursionGuard);
        jt = type.accept(visitor, null);
        _memoizedDeclaredTypes.put(type, jt);
    }
    return jt;
}