Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.3.0)

E80355-01

ClassLoader Class Reference

#include <coherence/lang/ClassLoader.hpp>

Inherits Object.

Inherited by SystemClassLoader [virtual].

List of all members.


Detailed Description

ClassLoader provides a mechanism for obtaining a Class object.

Classes may be manually registered with a loader, or the loader may search out classes using custom search and load mechanisms.

Not all classes are required to have a corresponding Class representation.

The simplest way to enable a Class to be looked up by name, is to register it with the system ClassLoader, which can be obtained by calling ClassLoader::getSystemClassLoader(). For classes which include a no parameter static create method, a utility macro can be used to generate and register a Class automatically. For example, given the class Foo:

COH_REGISTER_TYPED_CLASS(Foo)

Will register a Class for Foo. This registration would normally occur in Foo.cpp, outside of any method.

Author:
mf 2008.04.02

Public Types

typedef spec::Handle Handle
 ClassLoader Handle definition.
typedef spec::View View
 ClassLoader View definition.
typedef spec::Holder Holder
 ClassLoader Holder definition.

Public Member Functions

virtual Class::View loadByName (String::View vsName) const =0
 Loads the class for the specified name.
virtual Class::View loadByType (const std::type_info &info) const =0
 Loads the class for the specified RTTI typeid.
virtual
ClassLoader::Handle 
getParent () const =0
 Returns the parent class loader for delegation.

Member Function Documentation

virtual Class::View loadByName ( String::View  vsName  )  const [pure virtual]

Loads the class for the specified name.

Parameters:
vsName the fully qualified name of the desired class
Returns:
the resulting Class object
Exceptions:
ClassNotFoundException if the class was not found

Implemented in SystemClassLoader.

virtual Class::View loadByType ( const std::type_info &  info  )  const [pure virtual]

Loads the class for the specified RTTI typeid.

Parameters:
info the class's type_info
Returns:
the resulting Class object
Exceptions:
ClassNotFoundException if the class was not found

Implemented in SystemClassLoader.

virtual ClassLoader::Handle getParent (  )  const [pure virtual]

Returns the parent class loader for delegation.

Returns:
the parent class loader for delegation; NULL indicates the system ClassLoader has been reached

Implemented in SystemClassLoader.


The documentation for this class was generated from the following file:
Copyright © 2000, 2017, Oracle and/or its affiliates. All rights reserved.