cvs commit: spice/sandbox/metaclass/src/java/org/realityforge/metaclass/introspector WrapperMetaClassAccessor.java RegistryMetaClassAccessor.java

Peter Donald <[email protected]>
Newsgroups gmane.comp.java.spice.cvs
Message-ID <[email protected]>
donaldp     03/10/27 22:41:56

  Added:       sandbox/metaclass/src/java/org/realityforge/metaclass/introspector
                        WrapperMetaClassAccessor.java
  Removed:     sandbox/metaclass/src/java/org/realityforge/metaclass/introspector
                        RegistryMetaClassAccessor.java
  Log:
  Delete the RegistryMetaClassAccessor as can be simulated by encapsulating a CachingMetaClassAccessor inside a WrapperMetaClassAccessor and keeping a reference to the Caching accessor
  
  Revision  Changes    Path
  1.1                  spice/sandbox/metaclass/src/java/org/realityforge/metaclass/introspector/WrapperMetaClassAccessor.java
  
  Index: WrapperMetaClassAccessor.java
  ===================================================================
  /*
   * Copyright (C) The Spice Group. All rights reserved.
   *
   * This software is published under the terms of the Spice
   * Software License version 1.1, a copy of which has been included
   * with this distribution in the LICENSE.txt file.
   */
  package org.realityforge.metaclass.introspector;
  
  import org.realityforge.metaclass.model.ClassDescriptor;
  
  /**
   * This Accessor implementation will wrap another MetaClassAccessor.
   * The purpose of the wrapping is to make it impossible for users to
   * get to the underlying accessor implementation.
   *
   * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2003/10/28 06:41:56 $
   */
  public class WrapperMetaClassAccessor
      implements MetaClassAccessor
  {
      /**
       * The underlying MetaClassAccessor.
       */
      private final MetaClassAccessor m_accessor;
  
     /**
      * Create an accessor for specified accessor.
      *
      * @param accessor the accessor
      */
     public WrapperMetaClassAccessor( final MetaClassAccessor accessor )
     {
        if( null == accessor )
        {
           throw new NullPointerException( "accessor" );
        }
        m_accessor = accessor;
     }
  
      /**
       * @see MetaClassAccessor#getClassDescriptor
       */
      public synchronized ClassDescriptor getClassDescriptor( final String classname,
                                                              final ClassLoader classLoader )
          throws MetaClassException
      {
          return m_accessor.getClassDescriptor( classname, classLoader );
      }
  }
  
  
  


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.