Logo
Distributed Genetic Programming Framework
print print

File org.sfc.meta.MetaInformation.java

Here you can find all the information about the file org.sfc.meta.MetaInformation.java. You may explore it here or download it onto your local disk.
/*
 * Copyright (c) 2006 Thomas Weise
 *
 * E-Mail           : tweise@gmx.de
 * Creation Date    : 2006-05-04 07:24:59
 * Original Filename: org.sfc.meta.MetaInformation.java
 * Version          : 1.0.2
 * Last modification: 2006-06-16
 *                by: Thomas Weise
 *
 * License          : GNU LESSER GENERAL PUBLIC LICENSE
 *                    Version 2.1, February 1999
 *                    You should have received a copy of this license along
 *                    with this library; if not, write to the Free Software
 *                    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *                    MA 02111-1307, USA or download the license under
 *                    http://www.gnu.org/copyleft/lesser.html.
 *
 * Warranty         : This software is provided "as is" 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.
 */


package org.sfc.meta;

import org.sfc.id.ID;
import org.sfc.id.IDManager;
import org.sfc.utils.Typesafe;



/**
 * This object holds the meta information for a class.
 *
 * @author Thomas Weise
 */

public class MetaInformation  extends ID<Class<?>, MetaInformation>
  {
/**
 * The serial version uid.
 */

  private static final long serialVersionUID = 1;

/**
 * The internally used id manager.
 */

  private static  final IDManager<Class<?>, MetaInformation> MANAGER =
    new IDManager<Class<?>, MetaInformation>();
  
/**
 * The internal property set.
 */

  private transient final PropertySet m_properties  ;

  
/**
 * Construct a meta-information record.
 */

  public  MetaInformation ()
    {
    super(Typesafe.get_class_context().get(1), MANAGER);
        
    this.m_properties = new PropertySet(this.get_id());
    }
  


/**
 * Obtain the property sets valid for the class described.
 * @return The property sets valid for the class described.
 */

  public  final PropertySet get_properties  ()
    {
    return this.m_properties;
    }

  
/**
 * Obtain the target class this meta-information can be applied to.
 * @return The target class this meta-information can be applied to.
 */

  public  final Class<?> get_target()
    {
    return this.get_id();
    }
  

/**
 * Obtain the manager for the ids of this type.
 * @return  The manager for the ids of this type.
 */

  @Override
  protected final IDManager<Class<?>, MetaInformation> get_manager ()
    {
    return MANAGER;
    }
  
/**
 * Get the meta information related to the class.
 * @param p_class The class to obtain the meta information of.
 * @return The meta information related to the class.
 */

  public  static  final MetaInformation get(Class<?> p_class)
    {
    MetaInformation l_m;
    
    for(; p_class != null; p_class = p_class.getSuperclass())
      {
      l_m = MANAGER.get(p_class);
      if(l_m != null) return l_m;
      }
    
    return null;
    }
  }

File Information:

file name:MetaInformation.java
package:org.sfc.meta
qualified name:org.sfc.meta.MetaInformation.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/sfc/meta/MetaInformation.java
size:3.060 KB (3134 B)
uploaded: 2015-07-22 04:11:12 GMT+0000
last update: 2006-06-16 05:28:45 GMT+0000
last access: 2018-01-24 01:16:45 GMT+0000

statistics online since 2006-01-02.   RSS Feed
Contact us by sending an email to tweise@gmx.de to receive further information, to report errors, or to join our project.
All content on this site (http://dgpf.sourceforge.net/) is LGPL-licensed.
http://dgpf.sourceforge.net/scripts/source/source.php last modified at 2015-07-22 04:10:53 GMT+0000 served at 2018-01-24 01:16:45 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo