Path: blob/master/sourcetools/com.ibm.jpp.preprocessor/com/ibm/jpp/om/PreprocessorWarning.java
6004 views
/*******************************************************************************1* Copyright (c) 1999, 2017 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/21package com.ibm.jpp.om;2223public class PreprocessorWarning {2425private final String message;26private final int line;27private final int charstart;28private final int charend;29private boolean shouldFail = true;3031public PreprocessorWarning(String message, int line, int charstart, int charend) {32this.message = message;33this.line = line;34this.charstart = charstart;35this.charend = charend;36}3738public PreprocessorWarning(String message, int line, int charstart, int charend, boolean shouldFail) {39this(message, line, charstart, charend);40this.shouldFail = shouldFail;41}4243/**44* Gets the charend.45*46* @return Returns a int47*/48public int getCharend() {49return charend;50}5152/**53* Gets the charstart.54*55* @return Returns a int56*/57public int getCharstart() {58return charstart;59}6061/**62* Gets the message.63*64* @return Returns a String65*/66public String getMessage() {67return message;68}6970/**71* Gets the line.72*73* @return Returns a int74*/75public int getLine() {76return line;77}7879public boolean shouldFail() {80return this.shouldFail;81}8283}848586