org.cache2k.xmlConfiguration.ConfigurationTokenizer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cache2k-xml-configuration Show documentation
Show all versions of cache2k-xml-configuration Show documentation
A light weight and high performance Java caching library. XML configuration file support.
This artifact is included in cache2k-all.
package org.cache2k.xmlConfiguration;
/*
* #%L
* cache2k XML configuration
* %%
* Copyright (C) 2000 - 2016 headissue GmbH, Munich
* %%
* Licensed 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.
* #L%
*/
/**
* The configuration tokenizer reads in a text representation of a configuration in a tokenized
* form. This abstracts the actual representation and makes it possible to not support only XML.
*
* @author Jens Wilke
*/
public interface ConfigurationTokenizer extends SourceLocation {
String getSource();
int getLineNumber();
/**
* The next item in the configuration or {@code null} if the end is reached.
*/
Item next() throws Exception;
interface Item extends SourceLocation {
String getSource();
int getLineNumber();
}
interface Property extends Item {
String getName();
String getValue();
/** Value is mutable for variable expansion */
void setValue(String v);
/** Indicates that variable expansion has occured. */
boolean isExpanded();
void setExpanded(boolean v);
}
interface Nest extends Item {
String getSectionName();
}
interface Unnest extends Item { }
interface End extends Item { }
}