Java 类org.simpleframework.xml.util.ConcurrentCache 实例源码

项目:simplexml    文件:PathParser.java   
/**
 * 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);
}
项目:simple-xml    文件:PathParser.java   
/**
 * 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);
}
项目:simplexml    文件:GetPart.java   
/**
 * 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;
}
项目:simplexml    文件:SetPart.java   
/**
 * 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;
}
项目:simplexml    文件:DetailExtractor.java   
/**
 * 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;
}
项目:simplexml    文件:FieldContact.java   
/**
 * 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;
}
项目:simple-xml    文件:GetPart.java   
/**
 * 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;
}
项目:simple-xml    文件:SetPart.java   
/**
 * 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;
}
项目:simple-xml    文件:DetailExtractor.java   
/**
 * 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;
}
项目:simple-xml    文件:FieldContact.java   
/**
 * 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;
}
项目:simplexml    文件:Builder.java   
/**
 * 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;
}
项目:simplexml    文件:Transformer.java   
/**
 * 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);
}
项目:simplexml    文件:RegistryMatcher.java   
/**
 * 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>();
}
项目:simplexml    文件:Registry.java   
/**
 * 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();
}
项目:simplexml    文件:RegistryBinder.java   
/**
 * 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();
}
项目:simplexml    文件:ConverterFactory.java   
/**
 * 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>();
}
项目:simplexml    文件:InstanceFactory.java   
/**
 * 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>();
}
项目:simplexml    文件:ScannerFactory.java   
/**
 * 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;
}
项目:simplexml    文件:LabelExtractor.java   
/**
 * 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;
}
项目:simple-xml    文件:Builder.java   
/**
 * 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;
}
项目:simple-xml    文件:Transformer.java   
/**
 * 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);
}
项目:simple-xml    文件:RegistryMatcher.java   
/**
 * 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>();
}
项目:simple-xml    文件:Registry.java   
/**
 * 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();
}
项目:simple-xml    文件:RegistryBinder.java   
/**
 * 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();
}
项目:simple-xml    文件:ConverterFactory.java   
/**
 * 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>();
}
项目:simple-xml    文件:InstanceFactory.java   
/**
 * 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>();
}
项目:simple-xml    文件:ScannerFactory.java   
/**
 * 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;
}
项目:simple-xml    文件:LabelExtractor.java   
/**
 * 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;
}