Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02

com.bea.util.jam
Interface JamClassLoader


public interface JamClassLoader

Object which can load representations of a java.lang.Class. Analagous to a java.lang.ClassLoader.


Method Summary
 JPackage getPackage(String qualifiedPackageName)
          Returns a representation of a package having the given name.
 JClass loadClass(String fieldDescriptor)
          Returns a representation of the named class.
 

Method Detail

loadClass

JClass loadClass(String fieldDescriptor)

Returns a representation of the named class. If the class is not under the same root as this JElement root, a representation of it will be synthesized via reflection (see note in class comments). The 'named' parameter must be a fully-qualified class name in the classfile 'Field Descriptor' format, a simple primitive name (e.g. 'long' or 'int'), or 'void'.

A note regarding fully-qualified class names: if you're looking up a non-array type by name, you can just pass the regular, fully-qualified name. If you're looking up an array type, you need to use the 'Field Descriptor' format as described in secion 4.3.2 of the VM spec. This is the same name format that is returned by JClass.getFieldDescriptor.

Inner classes cannot be loaded with this method. To load an inner class, you must load the outer class first and then call getClasses().

Note that this method always returns some JClass - it never returns null or throws ClassNotFoundException. If neither a sourcefile not a classfile could be located for the named class, a stubbed-out JClass will be returned with the isUnresolved() flag set to true. This JClass will have a name (as determined by the given descriptor), but no other information about it will be available.

Throws:
IllegalArgumentException - if the parameter is null or not a valid class name.

getPackage

JPackage getPackage(String qualifiedPackageName)
Returns a representation of a package having the given name.

Throws:
IllegalArgumentException - if the parameter is null or not a valid package name.

Copyright 1996, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02