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

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

Introduction

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

Prototype

ThrowStatement(AST ast) 

Source Link

Document

Creates a new unparented throw statement node owned by the given AST.

Usage

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

License:Open Source License

public ThrowStatement convert(org.eclipse.jdt.internal.compiler.ast.ThrowStatement statement) {
    final ThrowStatement throwStatement = new ThrowStatement(this.ast);
    throwStatement.setSourceRange(statement.sourceStart, statement.sourceEnd - statement.sourceStart + 1);
    throwStatement.setExpression(convert(statement.exception));
    return throwStatement;
}