Example usage for com.google.gwt.dev.asm Type getElementType

List of usage examples for com.google.gwt.dev.asm Type getElementType

Introduction

In this page you can find the example usage for com.google.gwt.dev.asm Type getElementType.

Prototype

public Type getElementType() 

Source Link

Document

Returns the type of the elements of this array type.

Usage

From source file:com.google.web.bindery.requestfactory.server.RequestFactoryJarExtractor.java

License:Apache License

/**
 * Process a type, possibly returning a rebased type.
 * /*from   ww w .j a va  2  s.  c  o  m*/
 * @param sourceType TODO
 */
private Type processType(String sourceType, Type type) {
    Type toReturn;
    synchronized (seen) {
        toReturn = seen.get(type);
        if (toReturn != null) {
            return toReturn;
        }
        toReturn = Type.getType(type.getDescriptor());
        seen.put(type, toReturn);
    }
    int sort = type.getSort();
    if (sort != Type.OBJECT && sort != Type.ARRAY) {
        return toReturn;
    }
    if (sort == Type.ARRAY) {
        processType(sourceType, type.getElementType());
        return toReturn;
    }
    assert type.getInternalName().charAt(0) != 'L';
    if (type.getInternalName().startsWith("java/") || type.getInternalName().startsWith("javax/")) {
        return toReturn;
    }
    if (VERBOSE) {
        System.out.println(sourceType + " -> " + type.getClassName());
    }
    Future<State> future = ex.submit(new ProcessOneType(type));
    inProcess.add(future);
    return toReturn;
}