[jackson-annotations] 01/02: Imported Upstream version 2.2.2

Wolodja Wentland babilen-guest at alioth.debian.org
Fri Aug 23 16:13:24 UTC 2013


This is an automated email from the git hooks/post-receive script.

babilen-guest pushed a commit to branch master
in repository jackson-annotations.

commit b6b3115707ec8254c92981d37b46373ece8fe438
Author: Wolodja Wentland <babilen at gmail.com>
Date:   Sat Aug 10 22:04:39 2013 +0200

    Imported Upstream version 2.2.2
---
 .gitignore                                         |   21 ++
 README.md                                          |  252 +++++++++++++++++++
 pom.xml                                            |   32 +++
 release-notes/VERSION                              |   84 +++++++
 .../jackson/annotation/JacksonAnnotation.java      |   20 ++
 .../annotation/JacksonAnnotationsInside.java       |   25 ++
 .../jackson/annotation/JacksonInject.java          |   28 +++
 .../jackson/annotation/JsonAnyGetter.java          |   23 ++
 .../jackson/annotation/JsonAnySetter.java          |   25 ++
 .../jackson/annotation/JsonAutoDetect.java         |  126 ++++++++++
 .../jackson/annotation/JsonBackReference.java      |   39 +++
 .../fasterxml/jackson/annotation/JsonCreator.java  |   36 +++
 .../fasterxml/jackson/annotation/JsonFilter.java   |   28 +++
 .../fasterxml/jackson/annotation/JsonFormat.java   |  252 +++++++++++++++++++
 .../fasterxml/jackson/annotation/JsonGetter.java   |   33 +++
 .../jackson/annotation/JsonIdentityInfo.java       |   75 ++++++
 .../jackson/annotation/JsonIdentityReference.java  |   35 +++
 .../fasterxml/jackson/annotation/JsonIgnore.java   |   58 +++++
 .../jackson/annotation/JsonIgnoreProperties.java   |   51 ++++
 .../jackson/annotation/JsonIgnoreType.java         |   31 +++
 .../fasterxml/jackson/annotation/JsonInclude.java  |   96 ++++++++
 .../jackson/annotation/JsonManagedReference.java   |   41 ++++
 .../fasterxml/jackson/annotation/JsonProperty.java |   67 +++++
 .../jackson/annotation/JsonPropertyOrder.java      |   46 ++++
 .../fasterxml/jackson/annotation/JsonRawValue.java |   31 +++
 .../fasterxml/jackson/annotation/JsonRootName.java |   25 ++
 .../fasterxml/jackson/annotation/JsonSetter.java   |   33 +++
 .../fasterxml/jackson/annotation/JsonSubTypes.java |   43 ++++
 .../fasterxml/jackson/annotation/JsonTypeId.java   |   37 +++
 .../fasterxml/jackson/annotation/JsonTypeInfo.java |  259 ++++++++++++++++++++
 .../fasterxml/jackson/annotation/JsonTypeName.java |   26 ++
 .../jackson/annotation/JsonUnwrapped.java          |   89 +++++++
 .../fasterxml/jackson/annotation/JsonValue.java    |   54 ++++
 .../com/fasterxml/jackson/annotation/JsonView.java |   34 +++
 .../jackson/annotation/ObjectIdGenerator.java      |  144 +++++++++++
 .../jackson/annotation/ObjectIdGenerators.java     |  164 +++++++++++++
 .../jackson/annotation/PropertyAccessor.java       |   87 +++++++
 .../fasterxml/jackson/annotation/package-info.java |   12 +
 src/main/resources/META-INF/LICENSE                |    8 +
 39 files changed, 2570 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..84914ec
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,21 @@
+# use glob syntax.
+syntax: glob
+*.class
+*~
+*.bak
+*.off
+*.old
+.DS_Store
+
+# building
+target
+
+# Eclipse
+.classpath
+.project
+.settings
+
+# IDEA
+*.iml
+*.ipr
+*.iws
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a9c406c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,252 @@
+# Overview
+
+This project contains general purpose annotations for
+Jackson Data Processor, used on value and handler types.
+The only annotations not included are ones that require dependency
+to the [Databind package](/FasterXML/jackson-databind).
+
+Project contains versions 2.0 and above: source code for earlier (1.x) versions is available from [Codehaus](http://jackson.codehaus.org) SVN repository.
+Note that with version 1.x these annotations were part of the 'core jar'.
+
+[Full Listing of Jackson Annotations](../../wiki/Jackson-Annotations) details all available annotations; [Javadocs](http://fasterxml.github.com/jackson-annotations/javadoc/2.2.0/) gives more details.
+
+-----
+
+## Usage, general
+
+### Improvements over typical Java annotations
+
+In addition to regular usage (see below), there are couple of noteworthy improvements Jackson does:
+
+* [Mix-in annotations](../../wiki/Mixin-Annotations) allow associating annotations on third-party classes ''without modifying classes''.
+* Jackson annotations support full inheritance: meaning that you can ''override annotation definitions'', and not just class annotations but also method/field annotations!
+
+### Maven, Java package
+
+All annotations are in Java package `com.fasterxml.core.annotation`.
+To use annotations, you need to use Maven dependency:
+
+```xml
+<dependency>
+  <groupId>com.fasterxml.jackson.core</groupId>
+  <artifactId>jackson-annotations</artifactId>
+  <version>2.2.0</version>
+</dependency>
+```
+
+or download jars from Maven repository or [Download page](http://wiki.fasterxml.com/JacksonDownload)
+
+## Usage, simple
+
+Let's start with simple use cases: renaming or ignoring properties, and modifying types that are used.
+
+Note: while examples only show field properties, same annotations would work with method (getter/setter) properties.
+
+### Annotations for renaming properties
+
+One of most common tasks is to change JSON name used for a property: for example:
+
+```java
+public class Name {
+  @JsonProperty("firstName")
+  public String _first_name;
+}
+```
+
+would result in JSON like:
+
+```json
+{ "firstName" : "Bob" }
+```
+
+instead of
+
+```json
+{ "_first_name" : "Bob" }
+```
+
+### Annotations for Ignoring properties
+
+Sometimes POJOs contain properties that you do not want to write out, so you can do:
+
+```java
+public class Value {
+  public int value;
+  @JsonIgnore public int internalValue;
+}
+```
+
+and get JSON like:
+
+```json
+{ "value" : 42 }
+```
+
+or, you may get properties in JSON that you just want to skip: if so, you can use:
+
+```java
+ at JsonIgnoreProperties({ "extra", "uselessValue" })
+public class Value {
+  public int value;
+}
+```
+
+which would be able to handle JSON like:
+
+```json
+{ "value" : 42, "extra" : "fluffy", "uselessValue" : -13 }
+```
+
+Finally, you may even want to just ignore any "extra" properties from JSON (ones for which there is no counterpart in POJO). This can be done by adding:
+
+```java
+ at JsonIgnoreProperties(ignoreUnknown=true)
+public class PojoWithAny {
+  public int value;
+}
+```
+
+### Annotations for choosing more/less specific types
+
+Sometimes the type Jackson uses when reading or writing a property is not quite what you want:
+
+* When reading (deserializing), declared type may be a general type, but you know which exact implementation type to use
+* When writing (serializing), Jackson will by default use the specific runtime type; but you may not want to include all information from that type but rather just contents of its supertype.
+
+These cases can be handled by following annotations:
+
+```java
+public class ValueContainer {
+  // although nominal type is 'Value', we want to read JSON as 'ValueImpl'
+  @JsonDeserialize(as=ValueImpl.class)
+  public Value value;
+
+  // although runtime type may be 'AdvancedType', we really want to serialize
+  // as 'BasicType'; two ways to do this:
+  @JsonSerialize(as=BasicType.class)
+  // or could also use: @JsonSerialize(typing=Typing.STATIC)
+  public BasicType another;
+}
+```
+
+-----
+
+## Usage, intermediate
+
+### Using constructors or factory methods
+
+By default, Jackson tries to use the "default" constructor (one that takes no arguments), when creating value instances. But you can also choose to use another constructor, or a static factory method to create instance. To do this, you will need to use annotation `@JsonCreator`, and possibly `@JsonProperty` annotations to bind names to arguments:
+
+```java
+public class CtorPOJO {
+   private final int _x, _y;
+
+   @JsonCreator
+   public CtorPOJO(@JsonProperty("x") int x, @JsonProperty("y") int y) {
+      _x = x;
+      _y = y;
+   }
+}
+```
+
+`@JsonCreator` can be used similarly for static factory methods.
+But there is also an alternative usage, which is so-called "delegating" creator:
+
+```java
+public class DelegatingPOJO {
+   private final int _x, _y;
+
+   @JsonCreator
+   public DelegatingPOJO(Map<String,Object> delegate) {
+      _x = (Integer) delegate.get("x");
+      _y = (Integer) delegate.get("y");
+   }
+}
+```
+      
+the difference being that the creator method can only take one argument, and that argument must NOT have `@JsonProperty` annotation.
+
+### Handling polymorphic types
+
+If you need to read and write values of Objects where there are multiple possible subtypes (i.e. ones that exhibit polymorphism), you may need to enable inclusion of type information. This is needed so that Jackson can read back correct Object type when deserializing (reading JSON into Objects).
+This can be done by adding `@JsonTypeInfo` annotation on ''base class'':
+
+```java
+// Include Java class name ("com.myempl.ImplClass") as JSON property "class"
+ at JsonTypeInfo(use=Id.CLASS, include=As.PROPERTY, property="class")
+public abstract class BaseClass {
+}
+
+public class Impl1 extends BaseClass {
+  public int x;
+}
+public class Impl2 extends BaseClass {
+  public String name;
+}
+
+public class PojoWithTypedObjects {
+  public List<BaseClass> items;
+}
+```
+
+and this could result in serialized JSON like:
+
+```json
+{ "items" : [
+  { "class":"Impl2", "name":"Bob" },
+  { "class":"Impl1", "x":13 }
+]}
+```
+
+Note that this annotation has lots of configuration possibilities: for more information check out
+[Intro to polymorphic type handling](http://www.cowtowncoder.com/blog/archives/2010/03/entry_372.html)
+
+### Changing property auto-detection
+
+The default Jackson property detection rules will find:
+
+* All ''public'' fields
+* All ''public'' getters ('getXxx()' methods)
+* All setters ('setXxx(value)' methods), ''regardless of visibility'')
+
+But if this does not work, you can change visibility levels by using annotation `@JsonAutoDetect`.
+If you wanted, for example, to auto-detect ALL fields (similar to how packages like GSON work), you could do:
+
+```java
+ at JsonAutoDetect(fieldVisibility=JsonAutoDetect.Visibility.ANY)
+public class POJOWithFields {
+  private int value;
+}
+```
+
+or, to disable auto-detection of fields altogether:
+
+```java
+ at JsonAutoDetect(fieldVisibility=JsonAutoDetect.Visibility.NONE)
+public class POJOWithNoFields {
+  // will NOT be included, unless there is access 'getValue()'
+  public int value;
+}
+```
+
+-----
+
+# Further reading
+
+Project-specific documentation:
+
+* [Full Listing of Jackson Annotations](../../wiki/JacksonAnnotations) details all available annotations.
+* [Documentation](../../wiki/Documentation)
+
+Usage:
+
+* You can make Jackson 2 use Jackson 1 annotations with [jackson-legacy-introspector](https://github.com/Laures/jackson-legacy-introspector)
+
+Related:
+
+* [Databinding](https://github.com/FasterXML/jackson-databind) module has more documentation, since it is the main user of annotations.
+In addition, here are other useful links:
+* [Jackson Project Home](http://wiki.fasterxml.com/JacksonHome)
+ * [Annotation documentation at FasterXML Wiki](http://wiki.fasterxml.com/JacksonAnnotations) covers 1.x annotations as well as 2.0
+
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..08dc9ca
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion> 
+  <parent>
+    <groupId>com.fasterxml</groupId>
+    <artifactId>oss-parent</artifactId>
+    <version>10</version>
+  </parent>
+
+  <groupId>com.fasterxml.jackson.core</groupId>
+  <artifactId>jackson-annotations</artifactId>
+  <name>Jackson-annotations</name>
+  <version>2.2.2</version>
+  <description>Core annotations used for value types, used by Jackson data binding package.
+  </description>
+
+  <url>http://wiki.fasterxml.com/JacksonHome</url>
+  <scm>
+    <connection>scm:git:git at github.com:FasterXML/jackson-annotations.git</connection>
+    <developerConnection>scm:git:git at github.com:FasterXML/jackson-annotations.git</developerConnection>
+    <url>http://github.com/FasterXML/jackson-annotations</url>
+    <tag>jackson-annotations-2.2.2</tag>
+  </scm>
+
+  <properties>
+    <!--
+     | Configuration properties for the OSGi maven-bundle-plugin
+    -->
+    <osgi.export>com.fasterxml.jackson.annotation.*;version=${project.version}</osgi.export>
+  </properties>
+
+</project>
diff --git a/release-notes/VERSION b/release-notes/VERSION
new file mode 100644
index 0000000..44e6424
--- /dev/null
+++ b/release-notes/VERSION
@@ -0,0 +1,84 @@
+Project: jackson-annotations
+Version: 2.2.2 (26-May-2013)
+
+No changes from previous version.
+
+------------------------------------------------------------------------
+=== History: ===
+------------------------------------------------------------------------
+
+2.2.1 (03-May-2013)
+
+- Moved LICENSE file under 'META-INF/' in jar
+
+2.2.0 (22-Apr-2013)
+
+New minor version, but no changes since 2.1.0.
+
+2.1.1 (11-Nov-2012)
+
+Fixes:
+
+* Make ObjectIdGenerator java.io.Serializable (needed when serializing
+  ObjectMappers/-Writers/-Readers)
+
+2.1.0 (08-Oct-2012)
+
+New features:
+
+* [Issue#4]: Add '@JsonIdentityReference', to support use case where values of
+  a specific reference property are always serialized as ids, never as full POJO
+
+Improvements:
+
+* Added '@JsonIdentityInfo.firstAsID' property, to allow forcing all references
+  to an Object to be serialized as id, including first one.
+* Fix OSGi artifact name to be fully-qualified
+
+
+2.0.2 (14-May-2012)
+
+Fixes:
+
+* OSGi bundle name was accidentally changed in 2.0.1; reverted back to one
+  used in 2.0.0, earlier
+ (reported Pascal G)
+
+2.0.1 (22-Apr-2012)
+
+Fixes:
+
+* [JACKSON-827] Fix incompatibilities with JDK 1.5 (2.0.0 accidentally
+  required 1.6)
+ (reported Pascal G)
+
+2.0.0 (25-Mar-2012)
+
+Improvements:
+
+* [JACKSON-437]: Allow injecting of type id as POJO property, by setting
+  new '@JsonTypeInfo.visible' property to true.
+* [JACKSON-669]: Allow prefix/suffix for @JsonUnwrapped properties
+  (requested by Aner P)
+* [JACKSON-787]: @JsonIgnoredProperties can be used on properties too
+
+New features:
+
+* [JACKSON-107]: Add support for Object Identity (to handled cycles, shared refs),
+  with @JsonIdentityInfo
+* [JACKSON-714] Add general-purpose '@JsonFormat' annotation
+* [JACKSON-752]: Add @JsonInclude (replacement of @JsonSerialize.include)
+* [JACKSON-754]: Add @JacksonAnnotationsInside for creating "annotation
+  bundles" (also: AnnotationIntrospector.isAnnotationBundle())
+
+Other:
+
+* Lots of miscellaneous refactoring; moving most annotations from
+  databind into this package; only leaving ones that depend on
+  databind package types
+
+------------------------------------------------------------------------
+=== History: ===
+------------------------------------------------------------------------
+
+[entries for versions 1.x and earlier not retained; refer to earlier releases)
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JacksonAnnotation.java b/src/main/java/com/fasterxml/jackson/annotation/JacksonAnnotation.java
new file mode 100644
index 0000000..4e80094
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JacksonAnnotation.java
@@ -0,0 +1,20 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Meta-annotation (annotations used on other annotations)
+ * used for marking all annotations that are
+ * part of Jackson package. Can be used for recognizing all
+ * Jackson annotations generically, and in future also for
+ * passing other generic annotation configuration.
+ */
+ at Target({ElementType.ANNOTATION_TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JacksonAnnotation
+{
+    // for now, a pure tag annotation, no parameters
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JacksonAnnotationsInside.java b/src/main/java/com/fasterxml/jackson/annotation/JacksonAnnotationsInside.java
new file mode 100644
index 0000000..5211432
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JacksonAnnotationsInside.java
@@ -0,0 +1,25 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Meta-annotation (annotations used on other annotations)
+ * used for indicating that instead of using target annotation
+ * (annotation annotated with this annotation),
+ * Jackson should use meta-annotations it has.
+ * This can be useful in creating "combo-annotations" by having
+ * a container annotation, which needs to be annotated with this
+ * annotation as well as all annotations it 'contains'.
+ * 
+ * @since 2.0
+ */
+ at Target({ElementType.ANNOTATION_TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JacksonAnnotationsInside
+{
+
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JacksonInject.java b/src/main/java/com/fasterxml/jackson/annotation/JacksonInject.java
new file mode 100644
index 0000000..dc03135
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JacksonInject.java
@@ -0,0 +1,28 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import com.fasterxml.jackson.annotation.JacksonAnnotation;
+
+/**
+ * Jackson-specific annotation used for indicating that value of
+ * annotated property will be "injected", i.e. set based on value
+ * configured by <code>ObjectMapper</code> (usually on per-call basis).
+ * Usually property is not deserialized from JSON, although it possible
+ * to have injected value as default and still allow optional override
+ * from JSON.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JacksonInject
+{
+    /**
+     * Logical id of the value to inject; if not specified (or specified
+     * as empty String), will use id based on declared type of property.
+     */
+    public String value() default "";
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonAnyGetter.java b/src/main/java/com/fasterxml/jackson/annotation/JsonAnyGetter.java
new file mode 100644
index 0000000..42199b3
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonAnyGetter.java
@@ -0,0 +1,23 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation that can be used to define a non-static,
+ * no-argument method or member field as something of a reverse of
+ * {@link JsonAnySetter} method; basically being used like a
+ * getter but such that contents of the returned Map (type <b>must</b> be
+ * {@link java.util.Map}) are serialized as if they were actual properties
+ * of the bean that contains method/field with this annotations.
+ * As with {@link JsonAnySetter}, only one property should be annotated
+ * with this annotation.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonAnyGetter
+{
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonAnySetter.java b/src/main/java/com/fasterxml/jackson/annotation/JsonAnySetter.java
new file mode 100644
index 0000000..8aefdf7
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonAnySetter.java
@@ -0,0 +1,25 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation that can be used to define a non-static,
+ * two-argument method (first argument name of property, second value
+ * to set), to be used as a "fallback" handler
+ * for all otherwise unrecognized properties found from JSON content.
+ * It is similar to {@link javax.xml.bind.annotation.XmlAnyElement}
+ * in behavior; and can only be used to denote a single property
+ * per type.
+ *<p>
+ * If used, all otherwise unmapped key-value pairs from JSON Object values
+ * are added to the property (of type Map or bean).
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonAnySetter
+{
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonAutoDetect.java b/src/main/java/com/fasterxml/jackson/annotation/JsonAutoDetect.java
new file mode 100644
index 0000000..2f7846d
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonAutoDetect.java
@@ -0,0 +1,126 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.Member;
+import java.lang.reflect.Modifier;
+
+/**
+ * Class annotation that can be used to define which kinds of Methods
+ * are to be detected by auto-detection.
+ * Auto-detection means using name conventions
+ * and/or signature templates to find methods to use for data binding.
+ * For example, so-called "getters" can be auto-detected by looking for
+ * public member methods that return a value, do not take argument,
+ * and have prefix "get" in their name.
+ *<p>
+ * Pseudo-value <code>NONE</code> means that all auto-detection is disabled
+ * for the <b>specific</b> class that annotation is applied to (including
+ * its super-types, but only when resolving that class).
+ * Pseudo-value <code>ALWAYS</code> means that auto-detection is enabled
+ * for all method types for the class in similar way.
+ *<p>
+ * The default value is <code>ALWAYS</code>: that is, by default, auto-detection
+ * is enabled for all classes unless instructed otherwise.
+ *<p>
+ * Starting with version 1.5, it is also possible to use more fine-grained
+ * definitions, to basically define minimum visibility level needed. Defaults
+ * are different for different types (getters need to be public; setters can
+ * have any access modifier, for example).
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonAutoDetect
+{
+    /**
+     * Enumeration for possible visibility thresholds (minimum visibility)
+     * that can be used to limit which methods (and fields) are
+     * auto-detected.
+     */
+    public enum Visibility {
+        /**
+         * Value that means that all kinds of access modifiers are acceptable,
+         * from private to public.
+         */
+        ANY,
+        /**
+         * Value that means that any other access modifier other than 'private'
+         * is considered auto-detectable.
+         */
+        NON_PRIVATE,
+        /**
+         * Value that means access modifiers 'protected' and 'public' are
+         * auto-detectable (and 'private' and "package access" == no modifiers
+         * are not)
+         */
+        PROTECTED_AND_PUBLIC,
+        /**
+         * Value to indicate that only 'public' access modifier is considered
+         * auto-detectable.
+         */
+        PUBLIC_ONLY,
+        /**
+         * Value that indicates that no access modifiers are auto-detectable:
+         * this can be used to explicitly disable auto-detection for specified
+         * types.
+         */
+        NONE,
+        
+        /**
+         * Value that indicates that default visibility level (whatever it is,
+         * depends on context) is to be used. This usually means that inherited
+         * value (from parent visibility settings) is to be used.
+         */
+        DEFAULT;
+
+        public boolean isVisible(Member m) {
+            switch (this) {
+            case ANY:
+                return true;
+            case NONE:
+                return false;
+            case NON_PRIVATE:
+                return !Modifier.isPrivate(m.getModifiers());
+            case PROTECTED_AND_PUBLIC:
+                if (Modifier.isProtected(m.getModifiers())) {
+                    return true;
+                }
+                // fall through to public case:
+            case PUBLIC_ONLY:
+                return Modifier.isPublic(m.getModifiers());
+            default:
+                return false;
+            }
+        }
+    }
+    
+    /**
+     * Minimum visibility required for auto-detecting regular getter methods.
+     */
+    Visibility getterVisibility() default Visibility.DEFAULT;
+
+    /**
+     * Minimum visibility required for auto-detecting is-getter methods.
+     */
+    Visibility isGetterVisibility() default Visibility.DEFAULT;
+    
+    /**
+     * Minimum visibility required for auto-detecting setter methods.
+     */    
+    Visibility setterVisibility() default Visibility.DEFAULT;
+
+    /**
+     * Minimum visibility required for auto-detecting Creator methods,
+     * except for no-argument constructors (which are always detected
+     * no matter what).
+     */
+    Visibility creatorVisibility() default Visibility.DEFAULT;
+
+    /**
+     * Minimum visibility required for auto-detecting member fields.
+     */ 
+    Visibility fieldVisibility() default Visibility.DEFAULT;
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonBackReference.java b/src/main/java/com/fasterxml/jackson/annotation/JsonBackReference.java
new file mode 100644
index 0000000..0ffe1c1
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonBackReference.java
@@ -0,0 +1,39 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate that associated property is part of
+ * two-way linkage between fields; and that its role is "child" (or "back") link.
+ * Value type of the property must be a bean: it can not be a Collection, Map,
+ * Array or enumeration.
+ * Linkage is handled such that the property
+ * annotated with this annotation is not serialized; and during deserialization,
+ * its value is set to instance that has the "managed" (forward) link.
+ *<p>
+ * All references have logical name to allow handling multiple linkages; typical case
+ * would be that where nodes have both parent/child and sibling linkages. If so,
+ * pairs of references should be named differently.
+ * It is an error for a class to have multiple back references with same name,
+ * even if types pointed are different.
+ *<p>
+ * Note: only methods and fields can be annotated with this annotation: constructor
+ * arguments should NOT be annotated, as they can not be either managed or back
+ * references.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonBackReference
+{
+    /**
+     * Logical have for the reference property pair; used to link managed and
+     * back references. Default name can be used if there is just single
+     * reference pair (for example, node class that just has parent/child linkage,
+     * consisting of one managed reference and matching back reference)
+     */
+    public String value() default "defaultReference";
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonCreator.java b/src/main/java/com/fasterxml/jackson/annotation/JsonCreator.java
new file mode 100644
index 0000000..0888d70
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonCreator.java
@@ -0,0 +1,36 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation that can be used to define constructors and factory
+ * methods as one to use for instantiating new instances of the associated
+ * class.
+ *<p>
+ * NOTE: when annotating creator methods (constructors, factory methods),
+ * method must either be:
+ *<ul>
+ * <li>Single-argument constructor/factory method without {@link JsonProperty}
+ *    annotation for the argument: if so, this is so-called "delegate creator",
+ *    in which case Jackson first binds JSON into type of the argument, and
+ *    then calls creator
+ *   </li>
+ * <li>Constructor/factory method where <b>every argument</b> is annotated with
+ *   either {@link JsonProperty} or {@link JacksonInject}, to indicate name
+ *   of property to bind to
+ *  </li>
+ * </ul>
+ * Also note that all {@link JsonProperty} annotations MUST use actual name
+ * (NOT empty String for "default"): this because Java bytecode does not
+ * retain names of method or constructor arguments.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonCreator
+{
+    // no values, since there's no property
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonFilter.java b/src/main/java/com/fasterxml/jackson/annotation/JsonFilter.java
new file mode 100644
index 0000000..6f952c2
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonFilter.java
@@ -0,0 +1,28 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate which logical filter is to be used
+ * for filtering out properties of type (class) annotated;
+ * association made by this annotation declaring ids of filters,
+ * and  <code>com.fasterxml.jackson.databind.ObjectMapper</code> (or objects
+ * it delegates to) providing matching filters by id.
+ *<p>
+ * Filters to use are usually of type
+ * <code>com.fasterxml.jackson.databind.ser.BeanPropertyFilter</code> and
+ * are registered through <code>com.fasterxml.jackson.databind.ObjectMapper</code>
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+ at com.fasterxml.jackson.annotation.JacksonAnnotation
+public @interface JsonFilter
+{
+    /**
+     * Id of filter to use; if empty String (""), no filter is to be used.
+     */
+    public String value();
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonFormat.java b/src/main/java/com/fasterxml/jackson/annotation/JsonFormat.java
new file mode 100644
index 0000000..0efce6c
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonFormat.java
@@ -0,0 +1,252 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.Locale;
+import java.util.TimeZone;
+
+/**
+ * General-purpose annotation used for configuring details of how
+ * values of properties are to be serialized.
+ * Unlike most other Jackson annotations, annotation does not
+ * have specific universal interpretation: instead, effect depends on datatype
+ * of property being annotated (or more specifically, deserializer
+ * and serializer being used).
+ *<p>
+ * Common uses include choosing between alternate representations -- for example,
+ * whether {@link java.util.Date} is to be serialized as number (Java timestamp)
+ * or String (such as ISO-8601 compatible time value) -- as well as configuring
+ * exact details with {@link #pattern} property.
+ *<p>
+ * As of Jackson 2.1, known special handling include:
+ *<ul>
+ * <li>{@link java.util.Date}: Shape can  be {@link Shape#STRING} or {@link Shape#NUMBER};
+ *    pattern may contain {@link java.text.SimpleDateFormat}-compatible pattern definition.
+ *   </li>
+ *</ul>
+ * Jackson 2.1 added following new features:
+ *<ul>
+ * <li>Can now be used on Classes (types) as well, for modified default behavior, possibly
+ *   overridden by per-property annotation
+ *   </li>
+ * <li>{@link java.lang.Enum}s: Shapes {@link Shape#STRING} and {@link Shape#NUMBER} can be
+ *    used to change between numeric (index) and textual (name or <code>toString()</code>);
+ *    but it is also possible to use {@link Shape#OBJECT} to serialize (but not deserialize)
+ *    {@link java.lang.Enum}s as JSON Objects (as if they were POJOs). NOTE: serialization
+ *     as JSON Object only works with class annotation; 
+ *    will not work as per-property annotation.
+ *   </li>
+ * <li>{@link java.util.Collection}s can be serialized as (and deserialized from) JSON Objects,
+ *    if {@link Shape#OBJECT} is used. NOTE: can ONLY be used as class annotation;
+ *    will not work as per-property annotation.
+ *   </li>
+ *</ul>
+ * 
+ * @since 2.0
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER,
+    ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonFormat
+{
+    /**
+     * Value that indicates that default {@link java.util.Locale}
+     * (from deserialization or serialization context) should be used:
+     * annotation does not define value to use.
+     */
+    public final static String DEFAULT_LOCALE = "##default";
+
+    /**
+     * Value that indicates that default {@link java.util.TimeZone}
+     * (from deserialization or serialization context) should be used:
+     * annotation does not define value to use.
+     */
+    public final static String DEFAULT_TIMEZONE = "##default";
+    
+    /**
+     * Datatype-specific additional piece of configuration that may be used
+     * to further refine formatting aspects. This may, for example, determine
+     * low-level format String used for {@link java.util.Date} serialization;
+     * however, exact use is determined by specific <code>JsonSerializer</code>
+     */
+    public String pattern() default "";
+
+    /**
+     * Structure to use for serialization: definition of mapping depends on datatype,
+     * but usually has straight-forward counterpart in data format (JSON).
+     * Note that commonly only a subset of shapes is available; and if 'invalid' value
+     * is chosen, defaults are usually used.
+     */
+    public Shape shape() default Shape.ANY;
+
+    /**
+     * {@link java.util.Locale} to use for serialization (if needed).
+     * Special value of {@link #DEFAULT_LOCALE}
+     * can be used to mean "just use the default", where default is specified
+     * by the serialization context, which in turn defaults to system
+     * defaults ({@link java.util.Locale#getDefault()}) unless explicitly
+     * set to another locale.
+     */
+    public String locale() default DEFAULT_LOCALE;
+    
+    /**
+     * {@link java.util.TimeZone} to use for serialization (if needed).
+     * Special value of {@link #DEFAULT_TIMEZONE}
+     * can be used to mean "just use the default", where default is specified
+     * by the serialization context, which in turn defaults to system
+     * defaults ({@link java.util.TimeZone#getDefault()}) unless explicitly
+     * set to another locale.
+     */
+    public String timezone() default DEFAULT_TIMEZONE;
+    
+    /*
+    /**********************************************************
+    /* Value enumeration(s), value class(es)
+    /**********************************************************
+     */
+
+    /**
+     * Value enumeration used for indicating preferred Shape; translates
+     * loosely to JSON types, with some extra values to indicate less precise
+     * choices (i.e. allowing one of multiple actual shapes)
+     */
+    public enum Shape
+    {
+        /**
+         * Marker enum value that indicates "default" (or "whatever") choice; needed
+         * since Annotations can not have null values for enums.
+         */
+        ANY,
+
+        /**
+         * Value that indicates shape should not be structural (that is, not
+         * {@link #ARRAY} or {@link #OBJECT}, but can be any other shape.
+         */
+        SCALAR,
+
+        /**
+         * Value that indicates that (JSON) Array type should be used.
+         */
+        ARRAY,
+        
+        /**
+         * Value that indicates that (JSON) Object type should be used.
+         */
+        OBJECT,
+
+        /**
+         * Value that indicates that a numeric (JSON) type should be used
+         * (but does not specify whether integer or floating-point representation
+         * should be used)
+         */
+        NUMBER,
+
+        /**
+         * Value that indicates that floating-point numeric type should be used
+         */
+        NUMBER_FLOAT,
+
+        /**
+         * Value that indicates that integer number type should be used
+         * (and not {@link #NUMBER_FLOAT}).
+         */
+        NUMBER_INT,
+
+        /**
+         * Value that indicates that (JSON) String type should be used.
+         */
+        STRING,
+        
+        /**
+         * Value that indicates that (JSON) boolean type
+         * (true, false) should be used.
+         */
+        BOOLEAN
+        ;
+
+        public boolean isNumeric() {
+            return (this == NUMBER) || (this == NUMBER_INT) || (this == NUMBER_FLOAT);
+        }
+
+        public boolean isStructured() {
+            return (this == OBJECT) || (this == ARRAY);
+        }
+    }
+
+    /**
+     * Helper class used to contain information from a single {@link JsonFormat}
+     * annotation.
+     */
+    public static class Value
+    {
+        private final String pattern;
+        private final Shape shape;
+        private final Locale locale;
+        private final TimeZone timezone;
+
+        public Value() {
+            this("", Shape.ANY, "", "");
+        }
+        
+        public Value(JsonFormat ann) {
+            this(ann.pattern(), ann.shape(), ann.locale(), ann.timezone());
+        }
+
+        public Value(String p, Shape sh, String localeStr, String tzStr)
+        {
+            this(p, sh
+                    ,(localeStr == null || localeStr.length() == 0 || DEFAULT_LOCALE.equals(localeStr)) ?
+                            null : new Locale(localeStr)
+                    ,(tzStr == null || tzStr.length() == 0 || DEFAULT_TIMEZONE.equals(tzStr)) ?
+                            null : TimeZone.getTimeZone(tzStr)
+            );
+        }
+
+        /**
+         * @since 2.1
+         */
+        public Value(String p, Shape sh, Locale l, TimeZone tz)
+        {
+            pattern = p;
+            shape = sh;
+            locale = l;
+            timezone = tz;
+        }
+
+        /**
+         * @since 2.1
+         */
+        public Value withPattern(String p) {
+            return new Value(p, shape, locale, timezone);
+        }
+
+        /**
+         * @since 2.1
+         */
+        public Value withShape(Shape s) {
+            return new Value(pattern, s, locale, timezone);
+        }
+
+        /**
+         * @since 2.1
+         */
+        public Value withLocale(Locale l) {
+            return new Value(pattern, shape, l, timezone);
+        }
+
+        /**
+         * @since 2.1
+         */
+        public Value withTimeZone(TimeZone tz) {
+            return new Value(pattern, shape, locale, tz);
+        }
+        
+        public String getPattern() { return pattern; }
+        public Shape getShape() { return shape; }
+        public Locale getLocale() { return locale; }
+        public TimeZone getTimeZone() { return timezone; }
+    }
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonGetter.java b/src/main/java/com/fasterxml/jackson/annotation/JsonGetter.java
new file mode 100644
index 0000000..677b32a
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonGetter.java
@@ -0,0 +1,33 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation that can be used to define a non-static,
+ * no-argument value-returning (non-void) method to be used as a "getter"
+ * for a logical property.
+ * It can be used as an alternative to more general
+ * {@link JsonProperty} annotation (which is the recommended choice in
+ * general case).
+ *<p>
+ * Getter means that when serializing Object instance of class that has
+ * this method (possibly inherited from a super class), a call is made
+ * through the method, and return value will be serialized as value of
+ * the property.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonGetter
+{
+    /**
+     * Defines name of the logical property this
+     * method is used to access ("get"); empty String means that
+     * name should be derived from the underlying method (using
+     * standard Bean name detection rules)
+     */
+    String value() default "";
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonIdentityInfo.java b/src/main/java/com/fasterxml/jackson/annotation/JsonIdentityInfo.java
new file mode 100644
index 0000000..9ccde66
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonIdentityInfo.java
@@ -0,0 +1,75 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used for indicating that values of annotated type
+ * or property should be serializing so that instances either
+ * contain additional object identifier (in addition actual object
+ * properties), or as a reference that consists of an object id
+ * that refers to a full serialization. In practice this is done
+ * by serializing the first instance as full object and object
+ * identity, and other references to the object as reference values.
+ *<p>
+ * There are two main approaches to generating object identifier:
+ * either using a generator (either one of standard ones, or a custom
+ * generator), or using a value of a property. The latter case is
+ * indicated by using a placeholder generator marker
+ * {@link ObjectIdGenerators.PropertyGenerator}; former by using explicit generator.
+ * Object id has to be serialized as a property in case of POJOs;
+ * object identity is currently NOT support for JSON Array types
+ * (Java arrays or Lists) or Java Map types.
+ *<p>
+ * Finally, note that generator type of {@link ObjectIdGenerators.None}
+ * indicates that no Object Id should be included or used: it is included
+ * to allow suppressing Object Ids using mix-in annotations.
+ * 
+ * @since 2.0
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE,
+    ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonIdentityInfo
+{
+    /**
+     * Name of JSON property in which Object Id will reside: also,
+     * if "from property" marker generator is used, identifies
+     * property that will be accessed to get type id.
+     * If a property is used, name must match its external
+     * name (one defined by annotation, or derived from accessor
+     * name as per Java Bean Introspection rules).
+     *<p>
+     * Default value is <code>@id</code>.
+     */
+    public String property() default "@id";
+
+    /**
+     * Generator to use for producing Object Identifier for objects:
+     * either one of pre-defined generators from
+     * {@link ObjectIdGenerator}, or a custom generator.
+     * Defined as class to instantiate.
+     *<p>
+     * Note that special type
+     * {@link ObjectIdGenerators.None}
+     * can be used to disable inclusion of Object Ids.
+     */
+    public Class<? extends ObjectIdGenerator<?>> generator();
+
+    /**
+     * Scope is used to define applicability of an Object Id: all ids
+     * must be unique within their scope; where scope is defined
+     * as combination of this value and generator type.
+     * Comparison is simple equivalence, meaning that both type
+     * generator type and scope class must be the same.
+     *<p>
+     * Scope is used for determining how many generators are needed;
+     * more than one scope is typically only needed if external Object Ids
+     * have overlapping value domains (i.e. are only unique within some
+     * limited scope)
+     */
+    public Class<?> scope() default Object.class;
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonIdentityReference.java b/src/main/java/com/fasterxml/jackson/annotation/JsonIdentityReference.java
new file mode 100644
index 0000000..27d97c0
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonIdentityReference.java
@@ -0,0 +1,35 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Optional annotation that can be used for customizing details of a reference
+ * to Objects for which "Object Identity" is enabled (see {@link JsonIdentityInfo}).
+ * The main use case is that of enforcing use of Object Id even for the first
+ * time an Object is referenced, instead of first instance being serialized
+ * as full POJO.
+ * 
+ * @since 2.1
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE,
+    ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonIdentityReference
+{
+    /**
+     * Marker to indicate whether all referenced values are to
+     * be serialized as ids (true); or by serializing the
+     * first encountered reference as POJO and only then as id (false).
+     *<p>
+     * Note that if value of 'true' is used, deserialization may require
+     * additional contextual information, and possibly using a custom
+     * id resolver -- the default handling may not be sufficient.
+     * 
+     * @since 2.1
+     */
+    public boolean alwaysAsId() default false;
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonIgnore.java b/src/main/java/com/fasterxml/jackson/annotation/JsonIgnore.java
new file mode 100644
index 0000000..3471a51
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonIgnore.java
@@ -0,0 +1,58 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation that indicates that the annotated method or field is to be
+ * ignored by introspection-based
+ * serialization and deserialization functionality. That is, it should
+ * not be consider a "getter", "setter" or "creator".
+ *<p>
+ * In addition, starting with Jackson 1.9, if this is the only annotation
+ * associated with a property, it will also cause cause the whole
+ * property to be ignored: that is, if setter has this annotation and
+ * getter has no annotations, getter is also effectively ignored.
+ * It is still possible for different accessors to use different
+ * annotations; so if only "getter" is to be ignored, other accessors
+ * (setter or field) would need explicit annotation to prevent
+ * ignoral (usually {@link JsonProperty}).
+ * <p>
+ * For example, a "getter" method that would otherwise denote
+ * a property (like, say, "getValue" to suggest property "value")
+ * to serialize, would be ignored and no such property would
+ * be output unless another annotation defines alternative method to use.
+ *<p>
+ * Before version 1.9, this annotation worked purely on method-by-method (or field-by-field)
+ * basis; annotation on one method or field did not imply ignoring other methods
+ * or fields. However, with version 1.9 and above, annotations associated
+ * with various accessors (getter, setter, field, constructor parameter) of
+ * a logical property are combined; meaning that annotations in one (say, setter)
+ * can have effects on all of them (if getter or field has nothing indicating
+ * otherwise).
+ *<p>
+ * Annotation is usually used just a like a marker annotation, that
+ * is, without explicitly defining 'value' argument (which defaults
+ * to <code>true</code>): but argument can be explicitly defined.
+ * This can be done to override an existing JsonIgnore by explicitly
+ * defining one with 'false' argument.
+ *<p>
+ * Annotation is similar to {@link javax.xml.bind.annotation.XmlTransient} 
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonIgnore
+{
+    /**
+     * Optional argument that defines whether this annotation is active
+     * or not. The only use for value 'false' if for overriding purposes
+     * (which is not needed often); most likely it is needed for use
+     * with "mix-in annotations" (aka "annotation overrides").
+     * For most cases, however, default value of "true" is just fine
+     * and should be omitted.
+     */
+    boolean value() default true;
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java b/src/main/java/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java
new file mode 100644
index 0000000..87978d6
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java
@@ -0,0 +1,51 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation that can be used to either suppress serialization of
+ * properties (during serialization), or ignore processing of
+ * JSON properties read (during deserialization).
+ *<p>
+ * Example:
+ *<pre>
+ * // to prevent specified fields from being serialized or deserialized
+ * // (i.e. not include in JSON output; or being set even if they were included)
+ * @JsonIgnoreProperties({ "internalId", "secretKey" })
+ * // To ignore any unknown properties in JSON input without exception:
+ * @JsonIgnoreProperties(ignoreUnknown=true)
+ *</pre>
+ *<p>
+ * Starting with 2.0, this annotation can be applied both to classes and
+ * to properties. If used for both, actual set will be union of all
+ * ignorals: that is, you can only add properties to ignore, not remove
+ * or override. So you can not remove properties to ignore using
+ * per-property annotation.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE,
+    ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonIgnoreProperties
+{
+    /**
+     * Names of properties to ignore.
+     */
+    public String[] value() default { };
+
+    /**
+     * Property that defines whether it is ok to just ignore any
+     * unrecognized properties during deserialization.
+     * If true, all properties that are unrecognized -- that is,
+     * there are no setters or creators that accept them -- are
+     * ignored without warnings (although handlers for unknown
+     * properties, if any, will still be called) without
+     * exception.
+     *<p>
+     * Does not have any effect on serialization.
+     */
+    public boolean ignoreUnknown() default false;
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonIgnoreType.java b/src/main/java/com/fasterxml/jackson/annotation/JsonIgnoreType.java
new file mode 100644
index 0000000..c05877e
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonIgnoreType.java
@@ -0,0 +1,31 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation that indicates that all properties of annotated
+ * type are to be ignored during serialization and deserialization.
+ *<p>
+ * Note: annotation does have boolean 'value' property (which defaults
+ * to 'true'), so that it is actually possible to override value
+ * using mix-in annotations.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonIgnoreType
+{
+    /**
+     * Optional argument that defines whether this annotation is active
+     * or not. The only use for value 'false' if for overriding purposes
+     * (which is not needed often); most likely it is needed for use
+     * with "mix-in annotations" ("annotation overrides").
+     * For most cases, however, default value of "true" is just fine
+     * and should be omitted.
+     */
+    boolean value() default true;
+
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonInclude.java b/src/main/java/com/fasterxml/jackson/annotation/JsonInclude.java
new file mode 100644
index 0000000..3d2db1e
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonInclude.java
@@ -0,0 +1,96 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate when value of the annotated property (when
+ * used for a field, method or constructor parameter), or all 
+ * properties of the annotated class, is to be serialized.
+ * Without annotation property values are always included, but by using
+ * this annotation one can specify simple exclusion rules to reduce
+ * amount of properties to write out.
+ * 
+ * @since 2.0
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD,
+    ElementType.TYPE, ElementType.PARAMETER})
+ at Retention(RetentionPolicy.RUNTIME)
+ at com.fasterxml.jackson.annotation.JacksonAnnotation
+public @interface JsonInclude
+{
+    /**
+     * Inclusion rule to use.
+     */
+    public Include value() default Include.ALWAYS;
+    
+    /*
+    /**********************************************************
+    /* Value enumerations needed
+    /**********************************************************
+     */
+
+    /**
+     * Enumeration used with {@link JsonInclude}
+     * to define which properties
+     * of Java Beans are to be included in serialization.
+     *<p>
+     * Note: Jackson 1.x had similarly named ("Inclusion") enumeration included
+     * in <code>JsonSerialize</code> annotation: it is not deprecated
+     * and this value used instead.
+     */
+    public enum Include
+    {
+        /**
+         * Value that indicates that property is to be always included,
+         * independent of value of the property.
+         */
+        ALWAYS,
+
+        /**
+         * Value that indicates that only properties with non-null
+         * values are to be included.
+         */
+        NON_NULL,
+
+        /**
+         * Value that indicates that only properties that have values
+         * that differ from default settings (meaning values they have
+         * when Bean is constructed with its no-arguments constructor)
+         * are to be included. Value is generally not useful with
+         * {@link java.util.Map}s, since they have no default values;
+         * and if used, works same as {@link #ALWAYS}.
+         */
+        NON_DEFAULT,
+
+        /**
+         * Value that indicates that only properties that have values
+         * that values that are null or what is considered empty are
+         * not to be included.
+         *<p>
+         * Default emptiness is defined for following type:
+         *<ul>
+         * <li>For {@link java.util.Collection}s and {@link java.util.Map}s,
+         *    method <code>isEmpty()</code> is called;
+         *   </li>
+         * <li>For Java arrays, empty arrays are ones with length of 0
+         *   </li>
+         * <li>For Java {@link java.lang.String}s, <code>length()</code> is called,
+         *   and return value of 0 indicates empty String (note that <code>String.isEmpty()</code>
+         *   was added in Java 1.6 and as such can not be used by Jackson
+         *   </li>
+         * <ul>
+         *  and for other types, non-null values are to be included.
+         *<p>
+         * Note that this default handling can be overridden by custom
+         * <code>JsonSerializer</code> implementation: if method <code>isEmpty()</code>
+         * is overridden, it will be called to see if non-null values are
+         * considered empty (null is always considered empty).
+         */
+        NON_EMPTY
+        ;
+    }
+
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonManagedReference.java b/src/main/java/com/fasterxml/jackson/annotation/JsonManagedReference.java
new file mode 100644
index 0000000..71d1cb7
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonManagedReference.java
@@ -0,0 +1,41 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate that annotated property is part of
+ * two-way linkage between fields; and that its role is "parent" (or "forward") link.
+ * Value type (class) of property must have a single compatible property annotated with
+ * {@link JsonBackReference}. Linkage is handled such that the property
+ * annotated with this annotation is handled normally (serialized normally, no
+ * special handling for deserialization); it is the matching back reference
+ * that requires special handling
+ *<p>
+ * All references have logical name to allow handling multiple linkages; typical case
+ * would be that where nodes have both parent/child and sibling linkages. If so,
+ * pairs of references should be named differently.
+ * It is an error for a class too have multiple managed references with same name,
+ * even if types pointed are different.
+ *<p>
+ * Note: only methods and fields can be annotated with this annotation: constructor
+ * arguments should NOT be annotated, as they can not be either managed or back
+ * references.
+ * 
+ * @author tatu
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonManagedReference
+{
+    /**
+     * Logical have for the reference property pair; used to link managed and
+     * back references. Default name can be used if there is just single
+     * reference pair (for example, node class that just has parent/child linkage,
+     * consisting of one managed reference and matching back reference)
+     */
+    public String value() default "defaultReference";
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonProperty.java b/src/main/java/com/fasterxml/jackson/annotation/JsonProperty.java
new file mode 100644
index 0000000..242c7b7
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonProperty.java
@@ -0,0 +1,67 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation that can be used to define a non-static
+ * method as a "setter" or "getter" for a logical property
+ * (depending on its signature),
+ * or non-static object field to be used (serialized, deserialized) as
+ * a logical property.
+ *<p>
+ * Default value ("") indicates that the field name is used
+ * as the property name without any modifications, but it
+ * can be specified to non-empty value to specify different
+ * name. Property name refers to name used externally, as
+ * the field name in JSON objects.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonProperty
+{
+    /**
+     * Special value that indicates that handlers should use the default
+     * name (derived from method or field name) for property.
+     * 
+     * @since 2.1
+     */
+    public final static String USE_DEFAULT_NAME = "";
+
+    /**
+     * Defines name of the logical property, i.e. JSON object field
+     * name to use for the property. If value is empty String (which is the
+     * default), will try to use name of the field that is annotated.
+     * Note that there is
+     * <b>no default name available for constructor arguments</b>,
+     * meaning that
+     * <b>Empty String is not a valid value for constructor arguments</b>.
+     */
+    String value() default USE_DEFAULT_NAME;
+
+    /**
+     * Property that indicates whether a value (which may be explicit
+     * null) is expected for property during deserialization or not.
+     * If expected, <code>BeanDeserialized</code> should indicate
+     * this as a validity problem (usually by throwing an exception,
+     * but this may be sent via problem handlers that can try to
+     * rectify the problem, for example, by supplying a default
+     * value).
+     *<p>
+     * Note that as of 2.0, this property is NOT used by
+     * <code>BeanDeserializer</code>: support is expected to be
+     * added for a later minor version.
+     * 
+     * @since 2.0
+     */
+    boolean required() default false;
+
+    /* NOTE: considering of adding ability to specify default
+     * String value -- would work well for scalar types, most of
+     * which can coerce from Strings. But won't add for 2.0 yet.
+     */
+    //String defaultValue() default "";
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonPropertyOrder.java b/src/main/java/com/fasterxml/jackson/annotation/JsonPropertyOrder.java
new file mode 100644
index 0000000..861b798
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonPropertyOrder.java
@@ -0,0 +1,46 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation that can be used to define ordering (possibly partial) to use
+ * when serializing object properties. Properties included in annotation
+ * declaration will be serialized first (in defined order), followed by
+ * any properties not included in the definition.
+ * Annotation definition will override any implicit orderings (such as
+ * guarantee that Creator-properties are serialized before non-creator
+ * properties)
+ *<p>
+ * Examples:
+ *<pre>
+ *  // ensure that "id" and "name" are output before other properties
+ *  <div>@</div>JsonPropertyOrder({ "id", "name" })
+ *  // order any properties that don't have explicit setting using alphabetic order
+ *  <div>@</div>JsonPropertyOrder(alphabetic=true)
+ *</pre>
+ *<p>
+ * This annotation may or may not have effect on deserialization: for basic JSON
+ * handling there is no effect, but for other supported data types (or structural
+ * conventions) there may be.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonPropertyOrder
+{
+    /**
+     * Order in which properties of annotated object are to be serialized in.
+     */
+    public String[] value() default { };
+
+    /**
+     * Property that defines what to do regarding ordering of properties
+     * not explicitly included in annotation instance. If set to true,
+     * they will be alphabetically ordered; if false, order is
+     * undefined (default setting)
+     */
+    public boolean alphabetic() default false;
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonRawValue.java b/src/main/java/com/fasterxml/jackson/annotation/JsonRawValue.java
new file mode 100644
index 0000000..e33d123
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonRawValue.java
@@ -0,0 +1,31 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation that indicates that the annotated method
+ * or field should be serialized by including literal String value
+ * of the property as is, without quoting of characters.
+ * This can be useful for injecting values already serialized in JSON or 
+ * passing javascript function definitions from server to a javascript client.
+ *<p>
+ * Warning: the resulting JSON stream may be invalid depending on your input value.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD })
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonRawValue
+{
+    /**
+     * Optional argument that defines whether this annotation is active
+     * or not. The only use for value 'false' if for overriding purposes
+     * (which is not needed often); most likely it is needed for use
+     * with "mix-in annotations" (aka "annotation overrides").
+     * For most cases, however, default value of "true" is just fine
+     * and should be omitted.
+     */
+    boolean value() default true;
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonRootName.java b/src/main/java/com/fasterxml/jackson/annotation/JsonRootName.java
new file mode 100644
index 0000000..e8e5732
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonRootName.java
@@ -0,0 +1,25 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation similar to {@link javax.xml.bind.annotation.XmlRootElement},
+ * used to indicate name to use for root-level wrapping, if wrapping is
+ * enabled. Annotation itself does not indicate that wrapping should
+ * be used; but if it is, name used for serialization should be name
+ * specified here, and deserializer will expect the name as well.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+ at com.fasterxml.jackson.annotation.JacksonAnnotation
+public @interface JsonRootName
+{
+    /**
+     * Root name to use if root-level wrapping is enabled.
+     */
+    public String value();
+
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonSetter.java b/src/main/java/com/fasterxml/jackson/annotation/JsonSetter.java
new file mode 100644
index 0000000..ada41d3
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonSetter.java
@@ -0,0 +1,33 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation that can be used to define a non-static,
+ * single-argument method to be used as a "setter" for a logical property
+ * as an alternative to recommended
+ * {@link JsonProperty} annotation (which was introduced in version 1.1).
+ *<p>
+ * Setter means that when a property with matching name is encountered in
+ * JSON content, this method will be used to set value of the property.
+ *<p>
+ * NOTE: this annotation was briefly deprecated for version 1.5; but has
+ * since been un-deprecated to both allow for asymmetric naming (possibly
+ * different name when reading and writing JSON), and more importantly to
+ * allow multi-argument setter method in future.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonSetter
+{
+    /**
+     * Optional default argument that defines logical property this
+     * method is used to modify ("set"); this is the property
+     * name used in JSON content.
+     */
+    String value() default "";
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonSubTypes.java b/src/main/java/com/fasterxml/jackson/annotation/JsonSubTypes.java
new file mode 100644
index 0000000..861e522
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonSubTypes.java
@@ -0,0 +1,43 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used with {@link JsonTypeInfo} to indicate sub types of serializable
+ * polymorphic types, and to associate logical names used within JSON content
+ * (which is more portable than using physical Java class names).
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.FIELD,
+    ElementType.METHOD, ElementType.PARAMETER})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonSubTypes {
+    /**
+     * Subtypes of the annotated type (annotated class, or property value type
+     * associated with the annotated method). These will be checked recursively
+     * so that types can be defined by only including direct subtypes.
+     */
+    public Type[] value();
+
+    /**
+     * Definition of a subtype, along with optional name. If name is missing, class
+     * of the type will be checked for {@link JsonTypeName} annotation; and if that
+     * is also missing or empty, a default
+     * name will be constructed by type id mechanism.
+     * Default name is usually based on class name.
+     */
+    public @interface Type {
+        /**
+         * Class of the subtype
+         */
+        public Class<?> value();
+
+        /**
+         * Logical type name used as the type identifier for the class
+         */
+        public String name() default "";
+    }
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonTypeId.java b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeId.java
new file mode 100644
index 0000000..4a875a2
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeId.java
@@ -0,0 +1,37 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation that can be used on a property accessor
+ * (field, getter or setter, constructor parameter) to indicate that
+ * the property is to contain type id to use when including
+ * polymorphic type information.
+ * Annotation should <b>only be used</b> if the intent is to override
+ * generation of standard type id: if so, value of the property will be
+ * accessed during serialization and used as the type id.
+ *<p>
+ * On deserialization annotation has no effect, as visibility of type id
+ * is governed by value of {@link JsonTypeInfo#visible}; properties with
+ * this annotation get no special handling.
+ *<p>
+ * On serialization, this annotation will exclude property from being
+ * serialized along other properties; instead, its value is serialized
+ * as the type identifier. Since type identifier may be included in
+ * various places, it may still appear like 'normal' property (when using
+ * {@link JsonTypeInfo.As#PROPERTY}), but is more commonly embedded
+ * in a different place, as per inclusion rules (see {@link JsonTypeInfo}
+ * for details).
+ * 
+ * @since 2.0
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonTypeId
+{
+
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java
new file mode 100644
index 0000000..ce05b9b
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java
@@ -0,0 +1,259 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * Annotation used for configuring details of if and how type information is
+ * used with JSON serialization and deserialization, to preserve information
+ * about actual class of Object instances. This is necessarily for polymorphic
+ * types, and may also be needed to link abstract declared types and matching
+ * concrete implementation.
+ *<p>
+ * Some examples of typical annotations:
+ *<pre>
+ *  // Include Java class name ("com.myempl.ImplClass") as JSON property "class"
+ *  @JsonTypeInfo(use=Id.CLASS, include=As.PROPERTY, property="class")
+ *  
+ *  // Include logical type name (defined in impl classes) as wrapper; 2 annotations
+ *  @JsonTypeInfo(use=Id.NAME, include=As.WRAPPER_OBJECT)
+ *  @JsonSubTypes({com.myemp.Impl1.class, com.myempl.Impl2.class})
+ *</pre>
+ * Alternatively you can also define fully customized type handling by using
+ * <code>@JsonTypeResolver</code> annotation (from databind package).
+ *<p>
+ * This annotation can be used both for types (classes) and properties.
+ * If both exist, annotation on property has precedence, as it is
+ * considered more specific.
+ *<p>
+ * When used for properties (fields, methods), this annotation applies
+ * to <b>values</b>: so when applied to structure types
+ * (like {@link java.util.Collection}, {@link java.util.Map}, arrays),
+ * will apply to contained values, not the container;
+ * for non-structured types there is no difference.
+ * This is identical to how JAXB handles type information
+ * annotations; and is chosen since it is the dominant use case.
+ * There is no per-property way to force type information to be included
+ * for type of container (structured type); for container types one has
+ * to use annotation for type declaration.
+ *<p>
+ * Note on visibility of type identifier: by default, deserialization
+ * (use during reading of JSON) of type identifier
+ * is completely handled by Jackson, and is <b>not passed to</b>
+ * deserializers. However, if so desired,
+ * it is possible to define property <code>visible = true</code>
+ * in which case property will be passed as-is to deserializers
+ * (and set via setter or field) on deserialization.
+ *<p>
+ * On serialization side, Jackson will generate type id by itself,
+ * except if there is a property with name that matches
+ * {@link #property()}, in which case value of that property is
+ * used instead.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE,
+    ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonTypeInfo
+{    
+    /*
+    /**********************************************************
+    /* Value enumerations used for properties
+    /**********************************************************
+     */
+    
+    /**
+     * Definition of different type identifiers that can be included in JSON
+     * during serialization, and used for deserialization.
+     */
+    public enum Id {
+        /**
+         * This means that no explicit type metadata is included, and typing is
+         * purely done using contextual information possibly augmented with other
+         * annotations.
+         */
+        NONE(null),
+
+        /**
+         * Means that fully-qualified Java class name is used as the type identifier.
+         */
+        CLASS("@class"),
+
+        /**
+         * Means that Java class name with minimal path is used as the type identifier.
+         * Minimal means that only the class name, and that part of preceding Java
+         * package name is included that is needed to construct fully-qualified name
+         * given fully-qualified name of the declared supertype; additionally a single
+         * leading dot ('.') must be used to indicate that partial class name is used.
+         * For example, for supertype "com.foobar.Base", and concrete type
+         * "com.foo.Impl", only ".Impl" would be included; and for "com.foo.impl.Impl2"
+         * only ".impl.Impl2" would be included.<br />
+         * <b>NOTE</b>: leading dot ('.') MUST be used to denote partial (minimal) name;
+         * if it is missing, value is assumed to be fully-qualified name. Fully-qualified
+         * name is used in cases where subtypes are not in same package (or sub-package
+         * thereof) as base class.
+         *<p>
+         * If all related classes are in the same Java package, this option can reduce
+         * amount of type information overhead, especially for small types.
+         * However, please note that using this alternative is inherently risky since it
+         * assumes that the
+         * supertype can be reliably detected. Given that it is based on declared type
+         * (since ultimate supertype, <code>java.lang.Object</code> would not be very
+         * useful reference point), this may not always work as expected.
+         */
+        MINIMAL_CLASS("@c"),
+
+        /**
+         * Means that logical type name is used as type information; name will then need
+         * to be separately resolved to actual concrete type (Class).
+         */
+        NAME("@type"),
+
+        /**
+         * Means that typing mechanism uses customized handling, with possibly
+         * custom configuration. This means that semantics of other properties is
+         * not defined by Jackson package, but by the custom implementation.
+         */
+        CUSTOM(null)
+        ;
+
+        private final String _defaultPropertyName;
+
+        private Id(String defProp) {
+            _defaultPropertyName = defProp;
+        }
+
+        public String getDefaultPropertyName() { return _defaultPropertyName; }
+    }
+
+    /**
+     * Definition of standard type inclusion mechanisms for type metadata.
+     * Used for standard metadata types, except for {@link Id#NONE}.
+     * May or may not be used for custom types ({@link Id#CUSTOM}).
+     */
+    public enum As {
+        /**
+         * Inclusion mechanism that uses a single configurable property, included
+         * along with actual data (POJO properties) as a separate meta-property.
+         * <p>
+         * Default choice for inclusion.
+         */
+        PROPERTY,
+
+        /**
+         * Inclusion mechanism that wraps typed JSON value (POJO
+         * serialized as JSON) in
+         * a JSON Object that has a single entry,
+         * where field name is serialized type identifier,
+         * and value is the actual JSON value.
+         *<p>
+         * Note: can only be used if type information can be serialized as
+         * String. This is true for standard type metadata types, but not
+         * necessarily for custom types.
+         */
+        WRAPPER_OBJECT,
+
+        /**
+         * Inclusion mechanism that wraps typed JSON value (POJO
+         * serialized as JSON) in
+         * a 2-element JSON array: first element is the serialized
+         * type identifier, and second element the serialized POJO
+         * as JSON Object.
+         */
+        WRAPPER_ARRAY,
+        
+        /**
+         * Inclusion mechanism similar to <code>PROPERTY</code>, except that
+         * property is included one-level higher in hierarchy, i.e. as sibling
+         * property at same level as JSON Object to type.
+         * Note that this choice <b>can only be used for properties</b>, not
+         * for types (classes). Trying to use it for classes will result in
+         * inclusion strategy of basic <code>PROPERTY</code> instead.
+         */
+        EXTERNAL_PROPERTY
+        ;
+    }
+    
+    /*
+    /**********************************************************
+    /* Annotation properties
+    /**********************************************************
+     */
+    
+    /**
+     * What kind of type metadata is to be used for serializing and deserializing
+     * type information for instances of annotated type (and its subtypes
+     * unless overridden)
+     */
+    public Id use();    
+    
+    /**
+     * What mechanism is used for including type metadata (if any; for
+     * {@link Id#NONE} nothing is included). Default
+     *<p>
+     * Note that for type metadata type of {@link Id#CUSTOM},
+     * this setting may or may not have any effect.
+     */
+    public As include() default As.PROPERTY;
+
+    /**
+     * Property names used when type inclusion method ({@link As#PROPERTY}) is used
+     * (or possibly when using type metadata of type {@link Id#CUSTOM}).
+     * If POJO itself has a property with same name, value of property
+     * will be set with type id metadata: if no such property exists, type id
+     * is only used for determining actual type.
+     *<p>
+     * Default property name used if this property is not explicitly defined
+     * (or is set to empty String) is based on
+     * type metadata type ({@link #use}) used.
+     */
+    public String property() default "";
+
+    /**
+     * Optional property that can be used to specify default implementation
+     * class to use if type identifier is either not present, or can not
+     * be mapped to a registered type (which can occur for ids, but not when
+     * specifying explicit class to use).
+     *<p>
+     * Note that while this property allows specification of the default
+     * implementation to use, it does not help with structural issues that
+     * may arise if type information is missing. This means that most often
+     * this is used with type-name -based resolution, to cover cases
+     * where new sub-types are added, but base type is not changed to
+     * reference new sub-types.
+     *<p>
+     * There are certain special values that indicate alternate behavior:
+     *<ul>
+     * <li>{@link None} means "there is no default implementation" (in which
+     *   case an error results from unmappable type)
+     * <li><code>com.fasterxml.jackson.databind.annotation.NoClass</code> means that
+     *   objects with unmappable (or missing) type are to be mapped to null references.
+     * </ul>
+     */
+    public Class<?> defaultImpl() default None.class;
+
+    /**
+     * Property that defines whether type identifier value will be passed
+     * as part of JSON stream to deserializer (true), or handled and
+     * removed by <code>TypeDeserializer</code> (false).
+     *<p>
+     * Default value is false, meaning that Jackson handles and removes
+     * the type identifier from JSON content that is passed to
+     * <code>JsonDeserializer</code>.
+     * 
+     * @since 2.0
+     */
+    public boolean visible() default false;
+    
+    /*
+    /**********************************************************
+    /* Helper classes
+    /**********************************************************
+     */
+
+    /**
+     * This marker class that is only to be used with <code>defaultImpl</code>
+     * annotation property, to indicate that there is no default implementation
+     * specified.
+     */
+    public abstract static class None { }
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonTypeName.java b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeName.java
new file mode 100644
index 0000000..45d6713
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeName.java
@@ -0,0 +1,26 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * Annotation used for binding logical name that the annotated class
+ * has. Used with {@link JsonTypeInfo} (and specifically its
+ * {@link JsonTypeInfo#use} property) to establish relationship
+ * between type names and types.
+ * 
+ * @author tatu
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonTypeName {
+    /**
+     * Logical type name for annotated type. If missing (or defined as Empty String),
+     * defaults to using non-qualified class name as the type.
+     */
+    public String value() default "";
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonUnwrapped.java b/src/main/java/com/fasterxml/jackson/annotation/JsonUnwrapped.java
new file mode 100644
index 0000000..3e0d5cd
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonUnwrapped.java
@@ -0,0 +1,89 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate that a property should be serialized
+ * "unwrapped"; that is, if it would be serialized as JSON Object, its
+ * properties are instead included as properties of its containing
+ * Object. For example, consider case of POJO like:
+ * 
+ *<pre>
+ *  public class Parent {
+ *    public int age;
+ *    public Name name;
+ *  }
+ *  public class Name {
+ *    public String first, last;
+ *  }
+ *</pre>  
+ * which would normally be serialized as follows (assuming @JsonUnwrapped
+ * had no effect):
+ *<pre>
+ *  {
+ *    "age" : 18,
+ *    "name" : {
+ *      "first" : "Joey",
+ *      "last" : "Sixpack"
+ *    }
+ *  }
+ *</pre>
+ * can be changed to this:
+ *<pre>
+ *  {
+ *    "age" : 18,
+ *    "first" : "Joey",
+ *    "last" : "Sixpack"
+ *  }
+ *</pre>
+ * by changing Parent class to:
+ *<pre>
+ *  public class Parent {
+ *    public int age;
+ *    @JsonUnwrapped
+ *    public Name name;
+ *  }
+ *</pre>
+ * Annotation can only be added to properties, and not classes, as it is contextual.
+ *<p>
+ * Also note that annotation only applies if
+ *<ul>
+ * <li>Value is serialized as JSON Object (can not unwrap JSON arrays using this
+ *   mechanism)
+ *   </li>
+ * <li>Serialization is done using <code>BeanSerializer</code>, not a custom serializer
+ *   </li>
+ * <li>No type information is added; if type information needs to be added, structure can
+ *   not be altered regardless of inclusion strategy; so annotation is basically ignored.
+ *   </li>
+ * </ul>
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonUnwrapped
+{
+    /**
+     * Property that is usually only used when overriding (masking) annotations,
+     * using mix-in annotations. Otherwise default value of 'true' is fine, and
+     * value need not be explicitly included.
+     */
+    boolean enabled() default true;
+
+    /**
+     * Optional property that can be used to add prefix String to use in front
+     * of names of properties that are unwrapped: this can be done for example to prevent
+     * name collisions.
+     */
+    String prefix() default "";
+
+    /**
+     * Optional property that can be used to add suffix String to append at the end
+     * of names of properties that are unwrapped: this can be done for example to prevent
+     * name collisions.
+     */
+    String suffix() default "";
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonValue.java b/src/main/java/com/fasterxml/jackson/annotation/JsonValue.java
new file mode 100644
index 0000000..9286d2a
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonValue.java
@@ -0,0 +1,54 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marker annotation similar to
+ * {@link javax.xml.bind.annotation.XmlValue} 
+ * that indicates that results of the annotated "getter" method
+ * (which means signature must be that of getters; non-void return
+ * type, no args) is to be used as the single value to serialize
+ * for the instance. Usually value will be of a simple scalar type
+ * (String or Number), but it can be any serializable type (Collection,
+ * Map or Bean).
+ *<p>
+ * At most one method of a <code>Class</code> can be annotated with this annotation;
+ * if more than one is found, an exception may be thrown.
+ * Also, if method signature is not compatible with Getters, an exception
+ * may be thrown (whether exception is thrown or not is an implementation detail (due
+ * to filtering during introspection, some annotations may be skipped)
+ * and applications should not rely on specific behavior).
+ *<p>
+ * A typical usage is that of annotating <code>toString()</code>
+ * method so that returned String value is used as the JSON serialization;
+ * and if deserialization is needed, there is matching constructor
+ * or factory method annotated with {@link JsonCreator} annotation.
+ *<p>
+ * Boolean argument is only used so that sub-classes can "disable"
+ * annotation if necessary.
+ *<p>
+ * NOTE: when use for Java <code>enum</code>s, one additional feature is
+ * that value returned by annotated method is also considered to be the
+ * value to deserialize from, not just JSON String to serialize as.
+ * This is possible since set of Enum values is constant and it is possible
+ * to define mapping, but can not be done in general for POJO types; as such,
+ * this is not used for POJO deserialization.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonValue
+{
+    /**
+     * Optional argument that defines whether this annotation is active
+     * or not. The only use for value 'false' if for overriding purposes.
+     * Overriding may be necessary when used
+     * with "mix-in annotations" (aka "annotation overrides").
+     * For most cases, however, default value of "true" is just fine
+     * and should be omitted.
+     */
+    boolean value() default true;
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonView.java b/src/main/java/com/fasterxml/jackson/annotation/JsonView.java
new file mode 100644
index 0000000..4243fb4
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonView.java
@@ -0,0 +1,34 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import com.fasterxml.jackson.annotation.JacksonAnnotation;
+
+/**
+ * Annotation used for indicating view(s) that the property
+ * that is defined by method or field annotated is part of.
+ *<p>
+ * An example annotation would be:
+ *<pre>
+ *  @JsonView(BasicView.class)
+ *</pre>
+ * which would specify that property annotated would be included
+ * when processing (serializing, deserializing) View identified
+ * by <code>BasicView.class</code> (or its sub-class).
+ * If multiple View class identifiers are included, property will
+ * be part of all of them.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonView {
+    /**
+     * View or views that annotated element is part of. Views are identified
+     * by classes, and use expected class inheritance relationship: child
+     * views contain all elements parent views have, for example.
+     */
+    public Class<?>[] value() default { };
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/ObjectIdGenerator.java b/src/main/java/com/fasterxml/jackson/annotation/ObjectIdGenerator.java
new file mode 100644
index 0000000..a0a6dcc
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/ObjectIdGenerator.java
@@ -0,0 +1,144 @@
+package com.fasterxml.jackson.annotation;
+
+/**
+ * Definition of API used for constructing Object Identifiers
+ * (as annotated using {@link JsonIdentityInfo}).
+ * Also defines factory methods used for creating instances
+ * for serialization, deserialization.
+ *
+ * @param <T> Type of Object Identifiers produced.
+ */
+public abstract class ObjectIdGenerator<T>
+    implements java.io.Serializable
+{
+    /*
+    /**********************************************************
+    /* Accessors
+    /**********************************************************
+     */
+
+    public abstract Class<?> getScope();
+
+    /**
+     * Method called to check whether this generator instance can
+     * be used for Object Ids of specific generator type and
+     * scope; determination is based by passing a configured
+     * "blueprint" (prototype) instance; from which the actual
+     * instances are created (using {@link #newForSerialization}).
+     * 
+     * @return True if this instance can be used as-is; false if not
+     */
+    public abstract boolean canUseFor(ObjectIdGenerator<?> gen);
+    
+    /*
+    /**********************************************************
+    /* Factory methods
+    /**********************************************************
+     */
+    
+    /**
+     * Factory method to create a blueprint instance for specified
+     * scope. Generators that do not use scope may return 'this'.
+     */
+    public abstract ObjectIdGenerator<T> forScope(Class<?> scope);
+    
+    /**
+     * Factory method called to create a new instance to use for
+     * serialization: needed since generators may have state
+     * (next id to produce).
+     *<p>
+     * Note that actual type of 'context' is
+     * <code>com.fasterxml.jackson.databind.SerializerProvider</code>,
+     * but can not be declared here as type itself (as well as call
+     * to this object) comes from databind package.
+     * 
+     * @param context Serialization context object used (of type
+     *    <code>com.fasterxml.jackson.databind.SerializerProvider</code>;
+     *    may be needed by more complex generators to access contextual
+     *    information such as configuration.
+     */
+    public abstract ObjectIdGenerator<T> newForSerialization(Object context);
+
+    /**
+     * Method for constructing key to use for ObjectId-to-POJO maps.
+     */
+    public abstract IdKey key(Object key);
+    
+    /*
+    /**********************************************************
+    /* Methods for serialization
+    /**********************************************************
+     */
+    
+    /**
+     * Method used for generating a new Object Identifier to serialize
+     * for given POJO.
+     * 
+     * @param forPojo POJO for which identifier is needed
+     * 
+     * @return Object Identifier to use.
+     */
+    public abstract T generateId(Object forPojo);
+
+    /*
+    /**********************************************************
+    /* Helper classes
+    /**********************************************************
+     */
+
+    /**
+     * Simple key class that can be used as a key for
+     * ObjectId-to-POJO mappings, when multiple ObjectId types
+     * and scopes are used.
+     */
+    public final static class IdKey
+        implements java.io.Serializable
+    {
+        private static final long serialVersionUID = 1L;
+
+        /**
+         * Type of {@link ObjectIdGenerator} used for generating Object Id
+         */
+        private final Class<?> type;
+
+        /**
+         * Scope of the Object Id (may be null, to denote global)
+         */
+        private final Class<?> scope;
+
+        /**
+         * Object for which Object Id was generated: can NOT be null.
+         */
+        private final Object key;
+
+        /**
+         * Hash code
+         */
+        private final int hashCode;
+        
+        public IdKey(Class<?> type, Class<?> scope, Object key) {
+            this.type = type;
+            this.scope = scope;
+            this.key = key;
+            
+            int h = key.hashCode() + type.getName().hashCode();
+            if (scope != null) {
+                h ^= scope.getName().hashCode();
+            }
+            hashCode = h;
+        }
+
+        @Override
+        public int hashCode() { return hashCode; }
+
+        @Override
+        public boolean equals(Object o)
+        {
+            if (o == this) return true;
+            if (o == null) return false;
+            if (o.getClass() != getClass()) return false;
+            IdKey other = (IdKey) o;
+            return (other.key.equals(key)) && (other.type == type) && (other.scope == scope);
+        }
+    }
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/ObjectIdGenerators.java b/src/main/java/com/fasterxml/jackson/annotation/ObjectIdGenerators.java
new file mode 100644
index 0000000..a083207
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/ObjectIdGenerators.java
@@ -0,0 +1,164 @@
+package com.fasterxml.jackson.annotation;
+
+import java.util.UUID;
+
+/**
+ * Container class for standard {@link ObjectIdGenerator} implementations.
+ */
+public class ObjectIdGenerators
+{
+    /*
+    /**********************************************************
+    /* Shared base class for concrete implementations
+    /**********************************************************
+     */
+
+    /**
+     * Helper class for implementations contained.
+     */
+    @SuppressWarnings("serial")
+    private abstract static class Base<T> extends ObjectIdGenerator<T>
+    {
+        protected final Class<?> _scope;
+
+        protected Base(Class<?> scope) {
+            _scope = scope;
+        }
+
+        @Override
+        public final Class<?> getScope() {
+            return _scope;
+        }
+        
+        @Override
+        public boolean canUseFor(ObjectIdGenerator<?> gen) {
+            return (gen.getClass() == getClass()) && (gen.getScope() == _scope);
+        }
+        
+        @Override
+        public abstract T generateId(Object forPojo);
+    }
+
+    /*
+    /**********************************************************
+    /* Implementation classes
+    /**********************************************************
+     */
+    
+    /**
+     * Abstract marker class used to allow explicitly specifying
+     * that no generator is used; which also implies that no
+     * Object Id is to be included or used.
+     */
+    @SuppressWarnings("serial")
+    public abstract static class None extends ObjectIdGenerator<Object> { }
+    
+    /**
+     * Abstract place-holder class which is used to denote case
+     * where Object Identifier to use comes from a POJO property
+     * (getter method or field). If so, value is written directly
+     * during serialization, and used as-is during deserialization.
+     *<p>
+     * Actual implementation class is part of <code>databind</code>
+     * package.
+     */
+    public abstract static class PropertyGenerator extends Base<Object> {
+        private static final long serialVersionUID = 1L;
+
+        protected PropertyGenerator(Class<?> scope) { super(scope); }
+    }
+    
+    /**
+     * Simple sequence-number based generator, which uses basic Java
+     * <code>int</code>s (starting with value 1) as Object Identifiers.
+     */
+    public final static class IntSequenceGenerator extends Base<Integer>
+    {
+        private static final long serialVersionUID = 1L;
+
+        protected transient int _nextValue;
+
+        public IntSequenceGenerator() { this(Object.class, -1); }
+        public IntSequenceGenerator(Class<?> scope, int fv) {
+            super(scope);
+            _nextValue = fv;
+        }
+
+        protected int initialValue() { return 1; }
+        
+        @Override
+        public ObjectIdGenerator<Integer> forScope(Class<?> scope) {
+            return (_scope == scope) ? this : new IntSequenceGenerator(scope, _nextValue);
+        }
+        
+        @Override
+        public ObjectIdGenerator<Integer> newForSerialization(Object context) {
+            return new IntSequenceGenerator(_scope, initialValue());
+        }
+
+        @Override
+        public IdKey key(Object key) {
+            return new IdKey(getClass(), _scope, key);
+        }
+        
+        @Override
+        public Integer generateId(Object forPojo) {
+            int id = _nextValue;
+            ++_nextValue;
+            return id;
+        }
+    }
+
+    /**
+     * Implementation that just uses {@link java.util.UUID}s as reliably
+     * unique identifiers: downside is that resulting String is
+     * 36 characters long.
+     *<p>
+     * One difference to other generators is that scope is always
+     * set as <code>Object.class</code> (regardless of arguments): this
+     * because UUIDs are globally unique, and scope has no meaning.
+     */
+    public final static class UUIDGenerator extends Base<UUID>
+    {
+        private static final long serialVersionUID = 1L;
+
+        public UUIDGenerator() { this(Object.class); }
+        private UUIDGenerator(Class<?> scope) {
+            super(Object.class);
+        }
+
+        /**
+         * Can just return base instance since this is essentially scopeless
+         */
+        @Override
+        public ObjectIdGenerator<UUID> forScope(Class<?> scope) {
+            return this;
+        }
+        
+        /**
+         * Can just return base instance since this is essentially scopeless
+         */
+        @Override
+        public ObjectIdGenerator<UUID> newForSerialization(Object context) {
+            return this;
+        }
+
+        @Override
+        public UUID generateId(Object forPojo) {
+            return UUID.randomUUID();
+        }
+
+        @Override
+        public IdKey key(Object key) {
+            return new IdKey(getClass(), null, key);
+        }
+
+        /**
+         * Since UUIDs are always unique, let's fully ignore scope definition
+         */
+        @Override
+        public boolean canUseFor(ObjectIdGenerator<?> gen) {
+            return (gen.getClass() == getClass());
+        }
+    }
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/PropertyAccessor.java b/src/main/java/com/fasterxml/jackson/annotation/PropertyAccessor.java
new file mode 100644
index 0000000..ef4b846
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/PropertyAccessor.java
@@ -0,0 +1,87 @@
+package com.fasterxml.jackson.annotation;
+
+/**
+ * Enumeration used to define kinds of elements (called "property accessors")
+ * that annotations like {@link JsonAutoDetect} apply to.
+ *<p>
+ * In addition to method types (GETTER/IS_GETTER, SETTER, CREATOR) and the
+ * field type (FIELD), 2 pseudo-types
+ * are defined for convenience: <code>ALWAYS</code> and <code>NONE</code>. These
+ * can be used to indicate, all or none of available method types (respectively),
+ * for use by annotations that takes <code>JsonMethod</code> argument.
+ */
+public enum PropertyAccessor
+{
+    /**
+     * Getters are methods used to get a POJO field value for serialization,
+     * or, under certain conditions also for de-serialization. Latter
+     * can be used for effectively setting Collection or Map values
+     * in absence of setters, iff returned value is not a copy but
+     * actual value of the logical property.
+     *<p>
+     * Since version 1.3, this does <b>NOT</b> include "is getters" (methods
+     * that return boolean and named 'isXxx' for property 'xxx'); instead,
+     * {@link #IS_GETTER} is used}.
+     */
+    GETTER,
+
+    /**
+     * Setters are methods used to set a POJO value for deserialization.
+     */
+    SETTER,
+
+    /**
+     * Creators are constructors and (static) factory methods used to
+     * construct POJO instances for deserialization
+     */
+    CREATOR,
+
+    /**
+     * Field refers to fields of regular Java objects. Although
+     * they are not really methods, addition of optional field-discovery
+     * in version 1.1 meant that there was need to enable/disable
+     * their auto-detection, and this is the place to add it in.
+     */
+    FIELD,
+
+    /**
+     * "Is getters" are getter-like methods that are named "isXxx"
+     * (instead of "getXxx" for getters) and return boolean value
+     * (either primitive, or {@link java.lang.Boolean}).
+     *
+     */
+    IS_GETTER,
+
+    /**
+     * This pseudo-type indicates that none of accessors if affected.
+     */
+    NONE,
+
+    /**
+     * This pseudo-type indicates that all accessors are affected.
+     */
+    ALL
+    ;
+
+    private PropertyAccessor() { }
+
+    public boolean creatorEnabled() {
+        return (this == CREATOR) || (this == ALL);
+    }
+
+    public boolean getterEnabled() {
+        return (this == GETTER) || (this == ALL);
+    }
+
+    public boolean isGetterEnabled() {
+        return (this == IS_GETTER) || (this == ALL);
+    }
+
+    public boolean setterEnabled() {
+        return (this == SETTER) || (this == ALL);
+    }
+
+    public boolean fieldEnabled() {
+        return (this == FIELD) || (this == ALL);
+    }
+}
diff --git a/src/main/java/com/fasterxml/jackson/annotation/package-info.java b/src/main/java/com/fasterxml/jackson/annotation/package-info.java
new file mode 100644
index 0000000..f88c1ea
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/package-info.java
@@ -0,0 +1,12 @@
+/**
+ * Public core annotations, most of which are used to configure how
+ * Data Mapping/Binding works. Annotations in this package can only
+ * have dependencies to non-annotation classes in Core package;
+ * annotations that have dependencies to Mapper classes are included
+ * in Mapper module (under <code>org.codehaus.jackson.map.annotate</code>).
+ * Also contains parameter types (mostly enums) needed by annotations.
+ *<p>
+ * Note that prior versions (1.x) contained these annotations within
+ * 'core' jar, as part of Streaming API.
+ */
+package com.fasterxml.jackson.annotation;
diff --git a/src/main/resources/META-INF/LICENSE b/src/main/resources/META-INF/LICENSE
new file mode 100644
index 0000000..ff94ef8
--- /dev/null
+++ b/src/main/resources/META-INF/LICENSE
@@ -0,0 +1,8 @@
+This copy of Jackson JSON processor annotations is licensed under the
+Apache (Software) License, version 2.0 ("the License").
+See the License for details about distribution rights, and the
+specific rights regarding derivate works.
+
+You may obtain a copy of the License at:
+
+http://www.apache.org/licenses/LICENSE-2.0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jackson-annotations.git



More information about the pkg-java-commits mailing list