I am reading some java code and I came across the following unfamiliar syntax:
controler.addOverridingModule( new AbstractModule() {
@Override
public void install() {
this.addPlanStrategyBinding("RandomTripToCarsharingStrategy").to( RandomTripToCarsharingStrategy.class ) ;
this.addPlanStrategyBinding("CarsharingSubtourModeChoiceStrategy").to( CarsharingSubtourModeChoiceStrategy.class ) ;
}
});
I am confused because the developer created a new method ("install") within the call to addOverridingModule. Could someone please tell me what is going on here?
Thanks!