com.zmicer.utils
Enum ClassLoaderUtils.ClassLoaderTypes

java.lang.Object
  extended by java.lang.Enum<ClassLoaderUtils.ClassLoaderTypes>
      extended by com.zmicer.utils.ClassLoaderUtils.ClassLoaderTypes
All Implemented Interfaces:
Serializable, Comparable<ClassLoaderUtils.ClassLoaderTypes>
Enclosing class:
ClassLoaderUtils

public static enum ClassLoaderUtils.ClassLoaderTypes
extends Enum<ClassLoaderUtils.ClassLoaderTypes>

Possible Class Loaders types Enum. It would also allow to get the code of the classloader iterating thourgh the List of ClassLoaders returned by the retrieveActualClassLoaders method.


Enum Constant Summary
CURRENT_CLASS
          Class Loader of the current class
CURRENT_THREAD_CONTEXT
          Class Loader of the current thread context
SYSTEM
          System Class Loader
 
Method Summary
 int getOrdNumber()
           
static ClassLoaderUtils.ClassLoaderTypes getTypeByOrdNumber(int ordNumber)
          Return the ClassLoaderTypes instance using the provided ordinal number
static ClassLoaderUtils.ClassLoaderTypes valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ClassLoaderUtils.ClassLoaderTypes[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CURRENT_THREAD_CONTEXT

public static final ClassLoaderUtils.ClassLoaderTypes CURRENT_THREAD_CONTEXT
Class Loader of the current thread context


CURRENT_CLASS

public static final ClassLoaderUtils.ClassLoaderTypes CURRENT_CLASS
Class Loader of the current class


SYSTEM

public static final ClassLoaderUtils.ClassLoaderTypes SYSTEM
System Class Loader

Method Detail

values

public static final ClassLoaderUtils.ClassLoaderTypes[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ClassLoaderUtils.ClassLoaderTypes c : ClassLoaderUtils.ClassLoaderTypes.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ClassLoaderUtils.ClassLoaderTypes valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getOrdNumber

public int getOrdNumber()
Returns:
the int ordinal number of the given Enum instance

getTypeByOrdNumber

public static ClassLoaderUtils.ClassLoaderTypes getTypeByOrdNumber(int ordNumber)
Return the ClassLoaderTypes instance using the provided ordinal number

Parameters:
ordNumber - ordinal number of the types
Returns:
the ClassLoaderTypes or the null if the wrong ordNumber was specified


Copyright © 2007 jzmicer.team. All Rights Reserved.