List of usage examples for org.eclipse.jdt.core.dom SwitchCase SwitchCase
SwitchCase(AST ast)
From source file:org.eclipse.jdt.core.dom.ASTConverter.java
License:Open Source License
public SwitchCase convert(org.eclipse.jdt.internal.compiler.ast.CaseStatement statement) { SwitchCase switchCase = new SwitchCase(this.ast); org.eclipse.jdt.internal.compiler.ast.Expression constantExpression = statement.constantExpression; if (constantExpression == null) { switchCase.setExpression(null);// www. j a v a2 s .co m } else { switchCase.setExpression(convert(constantExpression)); } switchCase.setSourceRange(statement.sourceStart, statement.sourceEnd - statement.sourceStart + 1); retrieveColonPosition(switchCase); return switchCase; }