Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 
 package org.kasource.kaevent.example.guice.custom;
 
 

Author(s):
rikardwigforss
//CHECKSTYLE:OFF
///CLOVER:OFF
    
    private double optimalTemp;
    public TempratureMethodResolver(double optimalTemp) {
        this. = optimalTemp;
    }
    @Override
    public Method resolveMethod(TemperatureChangeEvent event) {
    	..println("Resolve method");
        if (event.getCurrentTemperature() > ) {
            return ReflectionUtils.getDeclaredMethod(TemperatureChangeListener.class"highTemperature",
                    TemperatureChangeEvent.class);
        } else if (event.getCurrentTemperature() > 10) {
            return ReflectionUtils.getDeclaredMethod(TemperatureChangeListener.class"mediumTemperature",
                    TemperatureChangeEvent.class);
        } else {
            return ReflectionUtils.getDeclaredMethod(TemperatureChangeListener.class"lowTemperature",
                    TemperatureChangeEvent.class);
        }
    }

    

Returns:
the optimalTemp
    public double getOptimalTemp() {
        return ;
    }

    

Parameters:
optimalTemp the optimalTemp to set
    public void setOptimalTemp(double optimalTemp) {
        this. = optimalTemp;
    }
New to GrepCode? Check out our FAQ X