org.apache.hadoop.hbase.util
Class Classes

java.lang.Object
  extended by org.apache.hadoop.hbase.util.Classes

public class Classes
extends Object

Utilities for class manipulation.


Constructor Summary
Classes()
           
 
Method Summary
static Filter createForName(String className)
          This method is almost the same as #createWritableForName, except that this one doesn't expect the filter class to extends Configurable.
static Filter createWritableForName(String className)
          Used to dynamically load a filter class, and create a Writable filter.
static Class<?> extendedForName(String className)
          Equivalent of Class.forName(String) which also returns classes for primitives like boolean, etc.
static Class<? extends Filter> getFilterClassByName(String className)
          Used to dynamically load a filter class.
static String stringify(Class[] classes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Classes

public Classes()
Method Detail

extendedForName

public static Class<?> extendedForName(String className)
                                throws ClassNotFoundException
Equivalent of Class.forName(String) which also returns classes for primitives like boolean, etc.

Parameters:
className - The name of the class to retrieve. Can be either a normal class or a primitive class.
Returns:
The class specified by className
Throws:
ClassNotFoundException - If the requested class can not be found.

stringify

public static String stringify(Class[] classes)

getFilterClassByName

public static Class<? extends Filter> getFilterClassByName(String className)
                                                    throws ClassNotFoundException
Used to dynamically load a filter class.

Parameters:
className - the filter class name
Returns:
a filter class
Throws:
ClassNotFoundException - if couldn't find the class

createWritableForName

public static Filter createWritableForName(String className)
Used to dynamically load a filter class, and create a Writable filter. This filter class most likely extends Configurable.

Parameters:
className - the filter class name.
Returns:
a filter

createForName

public static Filter createForName(String className)
This method is almost the same as #createWritableForName, except that this one doesn't expect the filter class to extends Configurable.

Parameters:
className - the filter class name.
Returns:
a filter


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.