All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hpccsystems.ws.client.antlr.CaseControlStringStream Maven / Gradle / Ivy

Go to download

This project allows a user to interact with ESP services in a controlled manner. The API calls available under org.hpccsystems.ws.client.platform allow for a user to target ESP's across multiple environments running a range of hpccsystems-platform versions. There is no guarantee that if a user utilizes org.hpccsystems.ws.client.gen generated stub code from wsdl, that the calls will be backwards compatible with older hpccsystems-platform versions.

There is a newer version: 9.6.18-1
Show newest version
package org.hpccsystems.ws.client.antlr;

import org.antlr.v4.runtime.ANTLRInputStream;

/*
    Copyright (C) 2005-2015 Christian P. Lerch 

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see .
*/

/**
 *
 * @author Christian P. Lerch
 * @version 1.0.0
 * @since 1.0
 */

/**
 *
 * @author rpastrana for HPCC
 *         Edited and reformatted
 *
 */

public class CaseControlStringStream extends ANTLRInputStream
{
    public boolean toUpperCase = false;// default: Stream is case-sensitive

    /**
     * Copy data from string to a local char array.
     *
     * @param input
     *            the input
     */
    public CaseControlStringStream(String input)
    {
        super();
        this.data = input.toCharArray();
        this.n = input.length();
    }

    /**
     * This is the preferred constructor as no data is actually copied.
     *
     * @param data
     *            the data
     * @param numberOfActualCharsInArray
     *            the number of actual chars in array
     */
    public CaseControlStringStream(char[] data, int numberOfActualCharsInArray)
    {
        super();
        this.data = data;
        this.n = numberOfActualCharsInArray;
    }

    /*
     * (non-Javadoc)
     * 
     * @see org.antlr.v4.runtime.ANTLRInputStream#LA(int)
     */
    @Override
    public int LA(int i)
    {
        int c = super.LA(i);
        return toUpperCase ? Character.toUpperCase(c) : c;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy