org.apache.hadoop.io
Class WritableName

java.lang.Object
  extended by org.apache.hadoop.io.WritableName

public class WritableName
extends Object

Utility to permit renaming of Writable implementation classes without invalidiating files that contain their class name.


Method Summary
static void addName(Class writableClass, String name)
          Add an alternate name for a class.
static Class<?> getClass(String name, Configuration conf)
          Return the class for a name.
static String getName(Class writableClass)
          Return the name for a class.
static void setName(Class writableClass, String name)
          Set the name that a class should be known as to something other than the class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setName

public static void setName(Class writableClass,
                           String name)
Set the name that a class should be known as to something other than the class name.


addName

public static void addName(Class writableClass,
                           String name)
Add an alternate name for a class.


getName

public static String getName(Class writableClass)
Return the name for a class. Default is Class.getName().


getClass

public static Class<?> getClass(String name,
                                Configuration conf)
                         throws IOException
Return the class for a name. Default is Class.forName(String).

Throws:
IOException


Copyright © 2009 The Apache Software Foundation