Class GenericClassWrapper<T>

Type Parameters:
T - the type of the class being wrapped

public class GenericClassWrapper<T> extends ClassWrapper<T>
A generic class wrapper for actually existing classes to make them compatible with the other wrappers. This wrapper is used to represent the actual superclass and interfaces of other wrapped classes. It wraps a class that already exists (loaded via reflection) and provides minimal functionality. Unlike full ClassWrapper subclasses, it does not support creating instances. Only use this if you already have the class available via reflection and NOT for classes which you expect to always exist!
  • Constructor Details

    • GenericClassWrapper

      public GenericClassWrapper(Class<T> clz)
      Constructs a new GenericClassWrapper for an existing class.
      Parameters:
      clz - the class to wrap
  • Method Details

    • getObj

      public Object getObj(boolean forceNew)
      This method is not supported for GenericClassWrapper as it only wraps existing classes.
      Specified by:
      getObj in class ClassWrapper<T>
      Parameters:
      forceNew - ignored
      Returns:
      always null