@Override
 public Car getObject() throws Exception {
   System.out.println("FactoryBean getObject() run...");
   Car car = new Car();
   car.setName("myCar");
   return car;
 }
Exemple #2
0
 public void modifyCar(int id, int price, String name, int model, String color) {
   Car temp = (Car) cars.get(id);
   temp.setPrice(price);
   temp.setName(name);
   temp.setModel(model);
   temp.setColor(color);
   cars.set(id, temp);
 }
Exemple #3
0
 void setCar(Car c) {
   c.setName(null);
 }