org.carrot2.util.attribute
Class BindableDescriptorUtils

java.lang.Object
  extended by org.carrot2.util.attribute.BindableDescriptorUtils

public final class BindableDescriptorUtils
extends Object

Utilities related to generated bindable descriptors.


Method Summary
static IBindableDescriptor getDescriptor(Class<?> clazz)
           
static Class<? extends IBindableDescriptor> getDescriptorClass(Class<?> clazz)
           
static String getDescriptorClassName(String className)
          Return the mapped descriptor class name for a given class name (descriptors for nested classes become top-level classes).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDescriptorClassName

public static String getDescriptorClassName(String className)
Return the mapped descriptor class name for a given class name (descriptors for nested classes become top-level classes).


getDescriptorClass

public static Class<? extends IBindableDescriptor> getDescriptorClass(Class<?> clazz)
Returns:
Returns the descriptor class for a class marked with Bindable.
Throws:
IllegalArgumentException - If the class is not annotated with Bindable.
NoClassDefFoundError - If the descriptor cannot be found.

getDescriptor

public static IBindableDescriptor getDescriptor(Class<?> clazz)
Returns:
Returns a descriptor instance for a class marked with Bindable.
Throws:
IllegalArgumentException - If the class is not annotated with Bindable.
NoClassDefFoundError - If the descriptor cannot be found.
RuntimeException - If instantiation fails for some reason.


Copyright (c) Dawid Weiss, Stanislaw Osinski