如何从服务Java类中取消公开操作,而不将其设为私有?
public class Service {
public Banana[] getBananas(){}
public Apple[] getApples(){}
public Basket getBasket(){}
// workaround, which I don't need as operation
public BasketFunction exposeBasketFunctionType()
}
public class Basket {
private int size;
private BasketFunction function;
// getters and setters section
}
public class BasketFunction {
private String position;
public void swingTops();
// getters and setters section
}
在这种情况下,问题是来自complexTypeMap
的{{1}}不“知道”TypeTable
是谁,并且必须直接在服务中公开,以便BasketFunction
1}}操作可以工作。