< prev index next >

src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Repository.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. --- 1,7 ---- /* ! * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership.
*** 29,62 **** * to SyntheticRepository with current class path by default. * * @see com.sun.org.apache.bcel.internal.util.Repository * @see SyntheticRepository * ! * @version $Id$ ! * @LastModified: Jun 2019 */ public abstract class Repository { private static com.sun.org.apache.bcel.internal.util.Repository repository = SyntheticRepository.getInstance(); ! /** @return currently used repository instance */ public static com.sun.org.apache.bcel.internal.util.Repository getRepository() { return repository; } ! /** Set repository instance to be used for class loading */ public static void setRepository( final com.sun.org.apache.bcel.internal.util.Repository rep ) { repository = rep; } ! /** Lookup class somewhere found on your CLASSPATH, or whereever the * repository instance looks for it. * * @return class object for given fully qualified class name * @throws ClassNotFoundException if the class could not be found or * parsed correctly --- 29,64 ---- * to SyntheticRepository with current class path by default. * * @see com.sun.org.apache.bcel.internal.util.Repository * @see SyntheticRepository * ! * @LastModified: Jan 2020 */ public abstract class Repository { private static com.sun.org.apache.bcel.internal.util.Repository repository = SyntheticRepository.getInstance(); ! /** ! * @return currently used repository instance */ public static com.sun.org.apache.bcel.internal.util.Repository getRepository() { return repository; } ! /** ! * Sets repository instance to be used for class loading */ public static void setRepository( final com.sun.org.apache.bcel.internal.util.Repository rep ) { repository = rep; } ! /** ! * Lookups class somewhere found on your CLASSPATH, or whereever the * repository instance looks for it. * * @return class object for given fully qualified class name * @throws ClassNotFoundException if the class could not be found or * parsed correctly
*** 65,75 **** return repository.loadClass(class_name); } /** ! * Try to find class source using the internal repository instance. * @see Class * @return JavaClass object for given runtime class * @throws ClassNotFoundException if the class could not be found or * parsed correctly */ --- 67,78 ---- return repository.loadClass(class_name); } /** ! * Tries to find class source using the internal repository instance. ! * * @see Class * @return JavaClass object for given runtime class * @throws ClassNotFoundException if the class could not be found or * parsed correctly */
*** 85,95 **** repository.clear(); } /** ! * Add clazz to repository if there isn't an equally named class already in there. * * @return old entry in repository */ public static JavaClass addClass( final JavaClass clazz ) { final JavaClass old = repository.findClass(clazz.getClassName()); --- 88,98 ---- repository.clear(); } /** ! * Adds clazz to repository if there isn't an equally named class already in there. * * @return old entry in repository */ public static JavaClass addClass( final JavaClass clazz ) { final JavaClass old = repository.findClass(clazz.getClassName());
*** 97,115 **** return old; } /** ! * Remove class with given (fully qualified) name from repository. */ public static void removeClass( final String clazz ) { repository.removeClass(repository.findClass(clazz)); } /** ! * Remove given class from repository. */ public static void removeClass( final JavaClass clazz ) { repository.removeClass(clazz); } --- 100,118 ---- return old; } /** ! * Removes class with given (fully qualified) name from repository. */ public static void removeClass( final String clazz ) { repository.removeClass(repository.findClass(clazz)); } /** ! * Removes given class from repository. */ public static void removeClass( final JavaClass clazz ) { repository.removeClass(clazz); }
< prev index next >