src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Repository.java
changeset 55496 8e0ae3830fca
parent 47216 71c04702a3d5
equal deleted inserted replaced
55495:badfa812b82a 55496:8e0ae3830fca
     1 /*
     1 /*
     2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
     3  */
     3  */
     4 /*
     4 /*
     5  * Licensed to the Apache Software Foundation (ASF) under one or more
     5  * Licensed to the Apache Software Foundation (ASF) under one or more
     6  * contributor license agreements.  See the NOTICE file distributed with
     6  * contributor license agreements.  See the NOTICE file distributed with
     7  * this work for additional information regarding copyright ownership.
     7  * this work for additional information regarding copyright ownership.
    20 package com.sun.org.apache.bcel.internal.util;
    20 package com.sun.org.apache.bcel.internal.util;
    21 
    21 
    22 import com.sun.org.apache.bcel.internal.classfile.JavaClass;
    22 import com.sun.org.apache.bcel.internal.classfile.JavaClass;
    23 
    23 
    24 /**
    24 /**
    25  * Abstract definition of a class repository. Instances may be used to load
    25  * Abstract definition of a class repository. Instances may be used
    26  * classes from different sources and may be used in the
    26  * to load classes from different sources and may be used in the
    27  * Repository.setRepository method.
    27  * Repository.setRepository method.
    28  *
    28  *
    29  * @see com.sun.org.apache.bcel.internal.Repository
    29  * @see com.sun.org.apache.bcel.internal.Repository
    30  * @version $Id: Repository.java 1747278 2016-06-07 17:28:43Z britter $
    30  * @version $Id$
       
    31  * @LastModified: Jun 2019
    31  */
    32  */
    32 public interface Repository {
    33 public interface Repository {
    33 
    34 
    34     /**
    35     /**
    35      * Store the provided class under "clazz.getClassName()"
    36      * Stores the provided class under "clazz.getClassName()"
    36      */
    37      */
    37     void storeClass(JavaClass clazz);
    38     void storeClass( JavaClass clazz );
       
    39 
    38 
    40 
    39     /**
    41     /**
    40      * Remove class from repository
    42      * Removes class from repository
    41      */
    43      */
    42     void removeClass(JavaClass clazz);
    44     void removeClass( JavaClass clazz );
       
    45 
    43 
    46 
    44     /**
    47     /**
    45      * Find the class with the name provided, if the class isn't there, return
    48      * Finds the class with the name provided, if the class
    46      * NULL.
    49      * isn't there, return NULL.
    47      */
    50      */
    48     JavaClass findClass(String className);
    51     JavaClass findClass( String className );
       
    52 
    49 
    53 
    50     /**
    54     /**
    51      * Find the class with the name provided, if the class isn't there, make an
    55      * Finds the class with the name provided, if the class
    52      * attempt to load it.
    56      * isn't there, make an attempt to load it.
    53      */
    57      */
    54     JavaClass loadClass(String className) throws java.lang.ClassNotFoundException;
    58     JavaClass loadClass( String className ) throws java.lang.ClassNotFoundException;
       
    59 
    55 
    60 
    56     /**
    61     /**
    57      * Find the JavaClass instance for the given run-time class object
    62      * Finds the JavaClass instance for the given run-time class object
    58      */
    63      */
    59     JavaClass loadClass(Class<?> clazz) throws java.lang.ClassNotFoundException;
    64     JavaClass loadClass( Class<?> clazz ) throws java.lang.ClassNotFoundException;
       
    65 
    60 
    66 
    61     /**
    67     /**
    62      * Clear all entries from cache.
    68      * Clears all entries from cache.
    63      */
    69      */
    64     void clear();
    70     void clear();
    65 }
    71 }