本文整理汇总了Java中org.simpleframework.xml.util.ConcurrentCache类的典型用法代码示例。如果您正苦于以下问题:Java ConcurrentCache类的具体用法?Java ConcurrentCache怎么用?Java ConcurrentCache使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ConcurrentCache类属于org.simpleframework.xml.util包,在下文中一共展示了ConcurrentCache类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PathParser
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>PathParser</code> object. This must
* be given a valid XPath expression. Currently only a subset of
* the XPath syntax is supported by this parser. Once finished
* the parser will contain all the extracted path segments.
*
* @param path this is the XPath expression to be parsed
* @param type this is the type the expressions are parsed for
* @param format this is the format used to style the path
*/
public PathParser(String path, Type type, Format format) throws Exception {
this.attributes = new ConcurrentCache<String>();
this.elements = new ConcurrentCache<String>();
this.indexes = new ArrayList<Integer>();
this.prefixes = new ArrayList<String>();
this.names = new ArrayList<String>();
this.builder = new StringBuilder();
this.style = format.getStyle();
this.type = type;
this.path = path;
this.parse(path);
}
示例2: GetPart
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>GetPart</code> object. This is
* used to create a method part that will provide a means for
* the serialization process to set a value to a object.
*
* @param method the method that is used to get the value
* @param label this describes how to serialize the value
* @param list this is the list of annotations on the method
*/
public GetPart(MethodName method, Annotation label, Annotation[] list) {
this.cache = new ConcurrentCache<Annotation>();
this.method = method.getMethod();
this.name = method.getName();
this.type = method.getType();
this.label = label;
this.list = list;
}
示例3: SetPart
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>SetPart</code> object. This is
* used to create a method part that will provide a means for
* the deserialization process to set a value to a object.
*
* @param method the method that is used to set the value
* @param label this describes how to deserialize the value
* @param list this is the list of annotations on the method
*/
public SetPart(MethodName method, Annotation label, Annotation[] list) {
this.cache = new ConcurrentCache<Annotation>();
this.method = method.getMethod();
this.name = method.getName();
this.type = method.getType();
this.label = label;
this.list = list;
}
示例4: DetailExtractor
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>DetailExtractor</code> object. This
* is used to extract various details for a class, such as the
* method and field details as well as the annotations used on
* the class. The primary purpose for this is to create cachable
* values that reduce the amount of reflection required.
*
* @param support this contains various support functions
* @param override this is the override used for details created
*/
public DetailExtractor(Support support, DefaultType override) {
this.methods = new ConcurrentCache<ContactList>();
this.fields = new ConcurrentCache<ContactList>();
this.details = new ConcurrentCache<Detail>();
this.override = override;
this.support = support;
}
示例5: FieldContact
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>FieldContact</code> object. This is
* used as a point of contact for a field within a schema class.
* Values can be read and written directly to the field with this.
*
* @param field this is the field that is the point of contact
* @param label this is the annotation that is used by the field
* @param list this is the list of annotations on the field
*/
public FieldContact(Field field, Annotation label, Annotation[] list) {
this.cache = new ConcurrentCache<Annotation>();
this.modifier = field.getModifiers();
this.name = field.getName();
this.label = label;
this.field = field;
this.list = list;
}
示例6: Builder
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>Builder</code> object. This will cache
* values constructed from the inner style object, which allows the
* results from the style to retrieved quickly the second time.
*
* @param style this is the internal style object to be used
*/
public Builder(Style style) {
this.attributes = new ConcurrentCache<String>();
this.elements = new ConcurrentCache<String>();
this.style = style;
}
示例7: Transformer
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>Transformer</code> object. This is
* used to create a transformer which will transform specified
* types using transforms loaded from the class path. Transforms
* are matched to types using the specified matcher object.
*
* @param matcher this is used to match types to transforms
*/
public Transformer(Matcher matcher) {
this.cache = new ConcurrentCache<Transform>();
this.error = new ConcurrentCache<Object>();
this.matcher = new DefaultMatcher(matcher);
}
示例8: RegistryMatcher
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>RegistryMatcher</code>. This is used
* to create a matcher instance that can resolve a transform by
* type and can also instantiate new transforms if required. It
* is essentially a convenience implementation.
*/
public RegistryMatcher() {
this.transforms = new ConcurrentCache<Transform>();
this.types = new ConcurrentCache<Class>();
}
示例9: Registry
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>Registry</code> object. This is used
* to create a registry between classes and the converters that
* should be used to serialize and deserialize the instances. All
* converters are instantiated once and cached for reuse.
*/
public Registry() {
this.cache = new ConcurrentCache<Converter>();
this.binder = new RegistryBinder();
}
示例10: RegistryBinder
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>RegistryBinder</code> object. This
* is used to create bindings between classes and the converters
* that should be used to serialize and deserialize the instances.
* All converters are instantiated once and cached for reuse.
*/
public RegistryBinder() {
this.cache = new ConcurrentCache<Class>();
this.factory = new ConverterFactory();
}
示例11: ConverterFactory
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>ConverterFactory</code> object.
* This will create an internal cache which is used to cache all
* instantiations made by the factory. Caching the converters
* ensures there is no overhead with instantiations.
*/
public ConverterFactory() {
this.cache = new ConcurrentCache<Converter>();
}
示例12: InstanceFactory
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>Instantiator</code> object. This will
* create a constructor cache that can be used to cache all of
* the constructors instantiated for the required types.
*/
public InstanceFactory() {
this.cache = new ConcurrentCache<Constructor>();
}
示例13: ScannerFactory
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>ScannerFactory</code> object. This is
* used to create a factory that will create and cache scanned
* data for a given class. Scanning the class is required to find
* the fields and methods that have been annotated.
*
* @param support this is used to determine if a type is primitive
*/
public ScannerFactory(Support support) {
this.cache = new ConcurrentCache<Scanner>();
this.support = support;
}
示例14: LabelExtractor
import org.simpleframework.xml.util.ConcurrentCache; //导入依赖的package包/类
/**
* Constructor for the <code>LabelExtractor</code> object. This
* creates an extractor that will extract labels for a specific
* contact. Labels are cached within the extractor so that they
* can be looked up without having to rebuild it each time.
*
* @param format this is the format used by the serializer
*/
public LabelExtractor(Format format) {
this.cache = new ConcurrentCache<LabelGroup>();
this.format = format;
}