[jboss-cvs] JBossAS SVN: r100502 - projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/spi.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 5 08:52:15 EST 2010


Author: flavia.rainone at jboss.com
Date: 2010-02-05 08:52:14 -0500 (Fri, 05 Feb 2010)
New Revision: 100502

Added:
   projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/spi/BootstrapClassPool.java
Log:
[JBREFLECT-94] New BootstrapClassPool.

Added: projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/spi/BootstrapClassPool.java
===================================================================
--- projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/spi/BootstrapClassPool.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/spi/BootstrapClassPool.java	2010-02-05 13:52:14 UTC (rev 100502)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This 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; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.classpool.spi;
+
+import javassist.ClassPool;
+
+/**
+ * This is the default BootstrapClassPool. It will be used by 
+ * {@code AbstractClassPoolFactory} to represent null parent class loaders,
+ * unless it has been configured to {@link
+ * AbstractClassPoolFactory#setDefaultClassPool(ClassPool)
+ * use a different class pool} for that purpose.
+ * 
+ * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ * @version $Revision 1.1 $
+ */
+public class BootstrapClassPool extends ClassPool
+{
+   private static final BootstrapClassPool instance = new BootstrapClassPool();
+   
+   public static final BootstrapClassPool getInstance()
+   {
+      return instance;
+   }
+   
+   private BootstrapClassPool()
+   {
+      super(null);
+      appendSystemPath();
+   }
+   
+   @Override
+   public ClassLoader getClassLoader()
+   {
+      return null;
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/spi/BootstrapClassPool.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native




More information about the jboss-cvs-commits mailing list