Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Constructor and description |
---|
SourceText
(AssertStatement stat, SourceUnit sourceUnit, Janitor janitor) Constructs a SourceText by reading the given assertion's source text from the given source unit. |
Type | Name and description |
---|---|
int |
getNormalizedColumn(int line, int column) Returns the column in getNormalizedText() corresponding to the given line and column in the original source text. |
String |
getNormalizedText() Returns the assertion's source text after removing line breaks. |
Constructs a SourceText by reading the given assertion's source text from the given source unit.
stat
- an assertion statementsourceUnit
- the source unit containing the assertion statementjanitor
- a Janitor for cleaning up reader sourcesReturns the column in getNormalizedText() corresponding to the given line and column in the original source text. The first character in the normalized text has column 1.
line
- a line numbercolumn
- a column numberReturns the assertion's source text after removing line breaks.
Limitation: Line comments within the assertion's source text are not handled.
Copyright © 2003-2015 The Apache Software Foundation. All rights reserved.