Class UserCodeObjectWrapper<T>

    • Constructor Detail

      • UserCodeObjectWrapper

        public UserCodeObjectWrapper​(T userCodeObject)
    • Method Detail

      • getUserCodeObject

        public T getUserCodeObject​(Class<? super T> superClass,
                                   ClassLoader cl)
        Description copied from interface: UserCodeWrapper
        Gets the user code object, which may be either a function or an input or output format. The subclass is supposed to just return the user code object or instantiate the class.
        Specified by:
        getUserCodeObject in interface UserCodeWrapper<T>
        Returns:
        The class with the user code.
      • getUserCodeObject

        public T getUserCodeObject()
        Description copied from interface: UserCodeWrapper
        Gets the user code object. In the case of a pact, that object will be the stub with the user function, in the case of an input or output format, it will be the format object.
        Specified by:
        getUserCodeObject in interface UserCodeWrapper<T>
        Returns:
        The class with the user code.
      • getUserCodeAnnotation

        public <A extends Annotation> A getUserCodeAnnotation​(Class<A> annotationClass)
        Description copied from interface: UserCodeWrapper
        Gets an annotation that pertains to the user code class. By default, this method will look for annotations statically present on the user code class. However, inheritors may override this behavior to provide annotations dynamically.
        Specified by:
        getUserCodeAnnotation in interface UserCodeWrapper<T>
        Parameters:
        annotationClass - the Class object corresponding to the annotation type
        Returns:
        the annotation, or null if no annotation of the requested type was found
      • getUserCodeClass

        public Class<? extends T> getUserCodeClass()
        Description copied from interface: UserCodeWrapper
        Gets the class of the user code. If the user code is provided as a class, this class is just returned. If the user code is provided as an object, Object.getClass() is called on the user code object.
        Specified by:
        getUserCodeClass in interface UserCodeWrapper<T>
        Returns:
        The class of the user code object.
      • hasObject

        public boolean hasObject()
        Description copied from interface: UserCodeWrapper
        Checks whether the wrapper already has an object, or whether it needs to instantiate it.
        Specified by:
        hasObject in interface UserCodeWrapper<T>
        Returns:
        True, if the wrapper has already an object, false if it has only a class.