Example usage for org.eclipse.jdt.internal.compiler.lookup RawTypeBinding genericType

List of usage examples for org.eclipse.jdt.internal.compiler.lookup RawTypeBinding genericType

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.lookup RawTypeBinding genericType.

Prototype

public ReferenceBinding genericType() 

Source Link

Document

Return the original generic type from which the parameterized type got instantiated from.

Usage

From source file:com.google.gwt.dev.jdt.TypeRefVisitor.java

License:Open Source License

private void maybeDispatch(Expression expression, TypeBinding binding) {
    assert (binding != null);

    if (binding instanceof SourceTypeBinding) {
        SourceTypeBinding type = (SourceTypeBinding) binding;
        onTypeRef(type, cud);//from www . j  ava 2 s.  c om
    } else if (binding instanceof ArrayBinding) {
        maybeDispatch(expression, ((ArrayBinding) binding).leafComponentType);
    } else if (binding instanceof BinaryTypeBinding) {
        onBinaryTypeRef((BinaryTypeBinding) binding, cud, expression);
    } else if (binding instanceof ParameterizedTypeBinding) {
        // Make sure that we depend on the generic version of the class.
        ParameterizedTypeBinding ptBinding = (ParameterizedTypeBinding) binding;
        maybeDispatch(expression, ptBinding.genericType());
    } else if (binding instanceof RawTypeBinding) {
        // Make sure that we depend on the generic version of the class.
        RawTypeBinding rawTypeBinding = (RawTypeBinding) binding;
        maybeDispatch(expression, rawTypeBinding.genericType());
    } else {
        // We don't care about other cases.
    }
}