class EntryProcessorResourceInjectorProxy<K, V, T> implements EntryProcessor<K, V, T>, Serializable {
    /** */
    private static final long serialVersionUID = 0L;

    /** Delegate. */
    private EntryProcessor<K, V, T> delegate;

    /** Injected flag. */
    private transient boolean injected;

    /**
     * @param delegate Delegate.
     */
    private EntryProcessorResourceInjectorProxy(EntryProcessor<K, V, T> delegate) {
        this.delegate = delegate;
    }

    /** {@inheritDoc} */
    @Override public T process(MutableEntry<K, V> entry, Object... arguments) throws EntryProcessorException {<FILL_FUNCTION_BODY>}

    /**
     * @return Delegate entry processor.
     */
    public EntryProcessor<K, V, T> delegate() {
        return delegate;
    }

    /**
     * Wraps EntryProcessor if needed.
     *
     * @param ctx Context.
     * @param proc Entry proc.
     * @return Wrapped entry proc if wrapping is needed.
     */
    public static <K, V, T> EntryProcessor<K, V, T> wrap(GridKernalContext ctx,
        @Nullable EntryProcessor<K, V, T> proc) {
        if (proc == null || proc instanceof EntryProcessorResourceInjectorProxy)
            return proc;

        GridResourceProcessor rsrcProc = ctx.resource();

        return rsrcProc.isAnnotationsPresent(null, proc, GridResourceIoc.AnnotationSet.ENTRY_PROCESSOR) ?
            new EntryProcessorResourceInjectorProxy<>(proc) : proc;
    }

    /**
     * Unwraps EntryProcessor as Object if needed.
     *
     * @param obj Entry processor.
     * @return Unwrapped entry processor.
     */
    static Object unwrap(Object obj) {
        return (obj instanceof EntryProcessorResourceInjectorProxy) ? ((EntryProcessorResourceInjectorProxy)obj).delegate() : obj;
    }
}

        if (!injected) {
            GridCacheContext cctx = entry.unwrap(GridCacheContext.class);

            GridResourceProcessor rsrc = cctx.kernalContext().resource();

            try {
                rsrc.inject(delegate, GridResourceIoc.AnnotationSet.ENTRY_PROCESSOR, cctx.name());
            }
            catch (IgniteCheckedException e) {
                throw new IgniteException(e);
            }

            injected = true;
        }

        return delegate.process(entry, arguments);
    
<no_super_class>