All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.restup.service.LazyIndexedVarArgsMethodCommand Maven / Gradle / Ivy

There is a newer version: 0.0.5
Show newest version
package com.github.restup.service;

import java.lang.reflect.Method;

/**
 * Determines the index mapping of method parameters to the array of available arguments on first execution of the method, lazily as needed.
 */
public class LazyIndexedVarArgsMethodCommand extends AbstractIndexedVarArgsMethodCommand {

    Integer[] indexes;

    public LazyIndexedVarArgsMethodCommand(Object objectInstance, Method method) {
        super(objectInstance, method);
    }

    @Override
    protected Integer[] getIndexes(Method method, Object[] args) {
        if (indexes == null) {
            indexes = bind(method, args);
        }
        return indexes;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy