The HEAP_INIT() function must have been called before using these functions so the environment variables can be stored into it and not depend on the argument or environment pointers to always be unchanged.
The tmparea_init() function must have been called before these functions so the internal CLASSPATH can be set up properly.
Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
Licensed under the Apache License, Version 2.0 ("the License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
Definition in file classpath.c.
#include "arch.h"
#include <string.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "jvmcfg.h"
#include "cfmacros.h"
#include "classfile.h"
#include "classpath.h"
#include "exit.h"
#include "heap.h"
#include "linkage.h"
#include "jvm.h"
#include "nts.h"
#include "utf.h"
#include "util.h"
Go to the source code of this file.
Functions | |
static void | classpath_c_dummy (void) |
rchar * | classpath_external2internal_classname (rchar *clsname) |
Convert class name format external to internal form. | |
rchar * | classpath_external2internal_classname_inplace (rchar *inoutbfr) |
rchar * | classpath_get_from_cp_entry_utf (cp_info_dup *clsname) |
Search CLASSPATH for a given class name using a CONSTANT_Utf8_info. | |
rchar * | classpath_get_from_prchar (rchar *clsname) |
Search CLASSPATH for a given class name using a prchar. | |
rvoid | classpath_init () |
rboolean | classpath_isjar (rchar *pclasspath) |
Determine whether or not a CLASSPATH entry is a JAR file instead of being a directory name. | |
rvoid | classpath_shutdown () |
Shut down the CLASSPATH search area of the JVM model after JVM execution. | |
Variables | |
static char * | classpath_c_copyright = "\0" "$URL: https://svn.apache.org/path/name/classpath.c $ $Id: classpath.c 0 09/28/2005 dlydick $" " " "Copyright 2005 The Apache Software Foundation or its licensors, as applicable." |
static rchar ** | classpath_list = ((rvoid *) 0) |
Initialize CLASSPATH search area of the JVM model. Permit null pointer manifest constant for initializing static and global storage. | |
static rint | classpath_list_len = 0 |
|
Definition at line 49 of file classpath.c. |
|
Definition at line 110 of file classpath.c. |
|
Determine whether or not a CLASSPATH entry is a JAR file instead of being a directory name.
A JAR file will be named
Definition at line 279 of file classpath.c. |
|
Convert class name format external to internal form.
The external format is
Definition at line 333 of file classpath.c. |
|
Definition at line 358 of file classpath.c. References CLASSNAME_EXTERNAL_DELIMITER_CHAR, and CLASSNAME_INTERNAL_DELIMITER_CHAR. |
|
Search CLASSPATH for a given class name using a prchar. Return heap pointer to a buffer containing its location. If not found, return rnull. If a class by this name is stored in more than one location, only the first location is returned. When done with result, call HEAP_FREE_DATA(result) to return buffer to heap area. All CLASSNAME_EXTERNAL_DELIMITER (ASCII period) characters found in the input class name will be unconditionally replaced with CLASSNAME_INTERNAL_DELIMITER (ASCII slash) characters. Therefore, the class file extension CLASSFILE_EXTENSION_DEFAULT may not be appended to the class name. This constraint permits both internal and external class names to use the same function to search for classes.
package some.package.name statement in source.
rchar *p = classpath_get_from_prchar( "some/package/name/SomeClassName"); if (rnull != p) { if (rtrue == classpath_isjar(p)) { ** Extract class from JAR file ** } else { ** Read class file directly ** } } < Convenient size for any disk path < terminator for instance of class
< Convenient size for a For internal use only.
Build up JAR command using internal class name with suffix. Make sure all files are writeable for final Definition at line 444 of file classpath.c. |
|
Search CLASSPATH for a given class name using a CONSTANT_Utf8_info. Invoke classpath_get_from_prchar after converting clsname from CONSTANT_Utf8_info to prchar. For more information, see classpath_get_from_prchar.
Definition at line 630 of file classpath.c. |
|
Shut down the CLASSPATH search area of the JVM model after JVM execution. Parameters: rvoid
Definition at line 653 of file classpath.c. |
|
Definition at line 49 of file classpath.c. |
|
Initialize CLASSPATH search area of the JVM model. Permit null pointer manifest constant for initializing static and global storage. Break CLASSPATH apart into its constituent paths. Run once during startup to parse CLASSPATH. Heap management must be started before calling this function via HEAP_INIT(). The command line must also have been scanned via argv_init(). The tmparea_init() function must have been called before these functions so the internal CLASSPATH can be set up properly.
Definition at line 103 of file classpath.c. |
|
Definition at line 108 of file classpath.c. |