tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r887610 [6/6] - in /tomcat/trunk/java/org/apache/tomcat/util/bcel: ./ classfile/ generic/ util/
Date Sat, 05 Dec 2009 23:22:52 GMT
Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/util/SyntheticRepository.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/util/SyntheticRepository.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/util/SyntheticRepository.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/util/SyntheticRepository.java Sat Dec  5
23:22:46 2009
@@ -82,12 +82,7 @@
     }
 
 
-    /**
-     * Remove class from repository
-     */
-    public void removeClass( JavaClass clazz ) {
-        _loadedClasses.remove(clazz.getClassName());
-    }
+    
 
 
     /**
@@ -131,44 +126,7 @@
     }
 
 
-    /**
-     * Find the JavaClass object for a runtime Class object.
-     * If a class with the same name is already in this Repository,
-     * the Repository version is returned.  Otherwise, getResourceAsStream()
-     * is called on the Class object to find the class's representation.
-     * If the representation is found, it is added to the Repository.
-     *
-     * @see Class
-     * @param clazz the runtime Class object
-     * @return JavaClass object for given runtime class
-     * @throws ClassNotFoundException if the class is not in the
-     *   Repository, and its representation could not be found
-     */
-    public JavaClass loadClass( Class clazz ) throws ClassNotFoundException {
-    	InputStream clsStream = null;
-    	try{
-	        String className = clazz.getName();
-	        JavaClass repositoryClass = findClass(className);
-	        if (repositoryClass != null) {
-	            return repositoryClass;
-	        }
-	        String name = className;
-	        int i = name.lastIndexOf('.');
-	        if (i > 0) {
-	            name = name.substring(i + 1);
-	        }
-	        clsStream = clazz.getResourceAsStream(name + ".class");
-	        return loadClass(clsStream, className);
-    	} finally {
-    		try{
-	    		if (clsStream != null){
-	    			clsStream.close();
-	    		}
-    		} catch(IOException ioe){
-    			//don't care
-    		}
-    	}
-    }
+    
 
 
     private JavaClass loadClass( InputStream is, String className ) throws ClassNotFoundException
{
@@ -187,16 +145,8 @@
     }
 
 
-    /** ClassPath associated with the Repository.
-     */
-    public ClassPath getClassPath() {
-        return _path;
-    }
+    
 
 
-    /** Clear all entries from cache.
-     */
-    public void clear() {
-        _loadedClasses.clear();
-    }
+    
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message