Change the way to disable @JsonCreator
diff --git a/release-notes/VERSION b/release-notes/VERSION
index 5018daa..b2ef809 100644
--- a/release-notes/VERSION
+++ b/release-notes/VERSION
@@ -13,12 +13,12 @@
2.5.0 (not yet released)
-#47: Add `@JsonCreator.mode` property to explicitly choose between delegating- and property-based creators
+#47: Add `@JsonCreator.mode` property to explicitly choose between delegating-
+ and property-based creators, or to disable specific creator (Mode.DISABLED)
#48: Allow `@JsonView` for (method) parameters too
#49: Add `@JsonTypeInfo.skipWritingDefault`
#50: Add `ObjectIdGenerator.maySerializeAsObject()`,
`ObjectIdGenerator.ObjectIdGenerator.maySerializeAsObject()` to support JSOG
-- Added `@JsonCreator.enabled` to allow suppression of existing annotation via mix-ins.
- Added `@JsonInclude.content` to allow specifying inclusion criteria
for `java.util.Map` entries separate from inclusion of `Map` values
themselves
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonCreator.java b/src/main/java/com/fasterxml/jackson/annotation/JsonCreator.java
index 968923a..dd1dee2 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonCreator.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonCreator.java
@@ -53,15 +53,6 @@
public Mode mode() default Mode.DEFAULT;
/**
- * Property that may be used to disable annotation: this is mostly useful with
- * annotation mix-ins, where one can suppress existing annotation from class
- * in case it causes problems, or if different creator should be used.
- *
- * @since 2.5
- */
- public boolean enabled() default true;
-
- /**
* @since 2.5
*/
public enum Mode {
@@ -87,6 +78,13 @@
* Note that this mode is currently (2.5) always used for multiple-argument creators;
* the only ambiguous case is that of a single-argument creator.
*/
- PROPERTIES
+ PROPERTIES,
+
+ /**
+ * Pseudo-mode that indicates that creator is not to be used. This can be used as a result
+ * value for explicit disabling, usually either by custom annotation introspector,
+ * or by annotation mix-ins (for example when choosing different creator).
+ */
+ DISABLED
}
}