在我的情况,我有使用Cache_Categories()
方法很多地方,但有些时候不需要重写After_Success()
方法是不覆盖After_Success()
方法可以调用的方法,无需重载接口参数空
接口:
public interface Web_Service
{
public void After_Success();
}
方法:
public static void Cache_Categories(Web_Service i)
{
i.After_Success();
}
致电: 通常
new App_Methods().Cache_Categories(this, false, new App_Methods.Web_Service()
{
@Override
public void After_Success()
{
}
});
通缉:
new App_Methods().Cache_Categories(this, false,null);
java-8有能力做到这一点。请遵循java-8特性的默认方法。 –