org.xbrlapi.impl
Class FragmentFactory<F>
java.lang.Object
org.xbrlapi.impl.FragmentFactory<F>
public class FragmentFactory<F>
- extends Object
Fragment instantiation factory used to create new fragments
of the correct fragment type from data in the data store.
- Author:
- Geoffrey Shuetrim (geoff@galexy.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FragmentFactory
public FragmentFactory()
getClass
public static Class getClass(String className)
throws XBRLException
- Get the class for the specified class name.
- Parameters:
className - The full name of the class to get.
- Returns:
- The class that has been named.
- Throws:
XBRLException - if the class cannot be obtained.
newFragment
public static <F extends XML> F newFragment(Store store,
Element root)
throws XBRLException
- Instantiate a fragment using its type.
- Type Parameters:
F - The subclass of XML being returned.- Parameters:
store - The data store that contains the fragment.root - The root element of the fragment.
- Returns:
- an instance of the fragment or null if it is not loadable.
- Throws:
XBRLException - if the class cannot be loaded.