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

org.simpleframework.xml.core.ConstructorCache Maven / Gradle / Ivy

Go to download

Simple is a high performance XML serialization and configuration framework for Java

There is a newer version: 2.7.1
Show newest version
/*
 * ConstructorCache.java July 2006
 *
 * Copyright (C) 2006, Niall Gallagher 
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This library 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General 
 * Public License along with this library; if not, write to the 
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
 * Boston, MA  02111-1307  USA
 */

package org.simpleframework.xml.core;

import java.lang.reflect.Constructor;
import java.util.concurrent.ConcurrentHashMap;

/**
 * The ConstructorCache object is a typed hash map used
 * to store the constructors used in converting a primitive type to
 * a primitive value using a string. This cache is used to reduce the
 * time taken to convert the primitives by reducing the amount of
 * reflection required and eliminate type resolution.
 * 
 * @author Niall Gallagher
 * 
 * @see org.simpleframework.xml.core.PrimitiveFactory
 */
class ConstructorCache extends ConcurrentHashMap {
   
   /**
    * Constructor for the ConstructorCache object. It
    * is used to create a typed hash table that can be used to map
    * the constructors used to convert strings to primitive types.
    * If the class is unloaded then the cached constructor is lost.
    */
   public ConstructorCache() {
      super();           
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy