Example usage for org.eclipse.jdt.core.dom TypeLiteral TypeLiteral

List of usage examples for org.eclipse.jdt.core.dom TypeLiteral TypeLiteral

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom TypeLiteral TypeLiteral.

Prototype

TypeLiteral(AST ast) 

Source Link

Document

Creates a new AST node for a type literal owned by the given AST.

Usage

From source file:org.eclipse.jdt.core.dom.ASTConverter.java

License:Open Source License

public Expression convert(org.eclipse.jdt.internal.compiler.ast.ClassLiteralAccess expression) {
    TypeLiteral typeLiteral = new TypeLiteral(this.ast);
    if (this.resolveBindings) {
        this.recordNodes(typeLiteral, expression);
    }//from   w w w  .jav a  2  s. c o  m
    typeLiteral.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1);
    typeLiteral.setType(convertType(expression.type));
    return typeLiteral;
}