com.amazonaws.util
Enum Classes

java.lang.Object
  extended by java.lang.Enum<Classes>
      extended by com.amazonaws.util.Classes
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Classes>

public enum Classes
extends java.lang.Enum<Classes>

Classes related utilities.


Method Summary
static java.lang.Class<?> childClassOf(java.lang.Class<?> parentClass, java.lang.Object instance)
          Returns the class of the immediate subclass of the given parent class for the given object instance; or null if such immediate subclass cannot be uniquely identified for the given object instance.
static java.util.jar.JarFile jarFileOf(java.lang.Class<?> klass)
          Returns the jar file from which the given class is loaded; or null if no such jar file can be located.
static Classes valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Classes[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

values

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

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

valueOf

public static Classes valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

childClassOf

public static java.lang.Class<?> childClassOf(java.lang.Class<?> parentClass,
                                              java.lang.Object instance)
Returns the class of the immediate subclass of the given parent class for the given object instance; or null if such immediate subclass cannot be uniquely identified for the given object instance.

Parameters:
parentClass - the parent class. The child class is Object if and only if the parent class is null.
instance - the given object instance

jarFileOf

public static java.util.jar.JarFile jarFileOf(java.lang.Class<?> klass)
Returns the jar file from which the given class is loaded; or null if no such jar file can be located.



Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.