Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
import java.beans.PropertyEditorManager;

public enum Pickup {

    HUMBUCKER,
    SINGLE_COIL;

    // Here's the little magic where we register the PickupEditor
    // which knows how to create this object from a string.
    // You can add any of your own Property Editors in the same way.
    static {
        PropertyEditorManager.registerEditor(Pickup.class, PickupEditor.class);
    }
}
Code Block
@Stateful
public class StratocasterImpl implements Stratocaster {

    @Resource(name = "pickups")
    private List<Pickup> pickups;
}

...