-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dmitrii Tikhomirov
committed
Mar 18, 2020
1 parent
b3c389f
commit 76213a1
Showing
220 changed files
with
22,959 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*.class | ||
.project | ||
.settings/ | ||
.classpath | ||
.idea/ | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?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>org.treblereel.gwt.jackson</groupId> | ||
<artifactId>jackson-parent</artifactId> | ||
<version>0.1-SNAPSHOT</version> | ||
<relativePath>..</relativePath> | ||
</parent> | ||
|
||
<artifactId>api</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<name>API</name> | ||
<description></description> | ||
<url>https://github.com/treblereel</url> | ||
|
||
<developers> | ||
<developer> | ||
<id>treblereel</id> | ||
<name>Dmitrii Tikhomirov</name> | ||
<email>chani@me.com</email> | ||
</developer> | ||
</developers> | ||
|
||
<licenses> | ||
<license> | ||
<name>Apache License Version 2.0</name> | ||
<url>https://www.apache.org/licenses/LICENSE-2.0</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<organization> | ||
<name>Treblereel</name> | ||
<url>https://github.com/treblereel</url> | ||
</organization> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.elemental2</groupId> | ||
<artifactId>elemental2-core</artifactId> | ||
<version>1.0.0-RC1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.gwtproject.i18n</groupId> | ||
<artifactId>gwt-datetimeformat</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/java</directory> | ||
<includes> | ||
<include>**/*.java</include> | ||
</includes> | ||
</resource> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
</resource> | ||
</resources> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>${maven.source.version}</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
22 changes: 22 additions & 0 deletions
22
api/src/main/java/org/treblereel/gwt/jackson/api/GwtIncompatible.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.treblereel.gwt.jackson.api; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* <p>GwtIncompatible class.</p> | ||
* | ||
* @author vegegoku | ||
* @version $Id: $Id | ||
*/ | ||
@Retention(RetentionPolicy.CLASS) | ||
@Target({ | ||
ElementType.TYPE, ElementType.METHOD, | ||
ElementType.CONSTRUCTOR, ElementType.FIELD }) | ||
@Documented | ||
public @interface GwtIncompatible { | ||
String value() default ""; | ||
} |
206 changes: 206 additions & 0 deletions
206
api/src/main/java/org/treblereel/gwt/jackson/api/GwtJacksonXMLDeserializerParameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
/* | ||
* Copyright 2013 Nicolas Morel | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.treblereel.gwt.jackson.api; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
import org.treblereel.gwt.jackson.api.deser.bean.IdentityDeserializationInfo; | ||
import org.treblereel.gwt.jackson.api.deser.bean.TypeDeserializationInfo; | ||
|
||
/** | ||
* This class includes parameters defined through properties annotations like { XMLIgnoreProperties}. They are specific to one | ||
* {@link XMLDeserializer} and that's why they are not contained inside {@link XMLDeserializationContext}. | ||
* | ||
* @author Nicolas Morel | ||
* @version $Id: $ | ||
*/ | ||
public final class GwtJacksonXMLDeserializerParameters implements XMLDeserializerParameters { | ||
|
||
/** | ||
* Constant <code>DEFAULT</code> | ||
*/ | ||
public static final XMLDeserializerParameters DEFAULT = new GwtJacksonXMLDeserializerParameters(); | ||
|
||
/** | ||
* 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 {@link XMLDeserializer} | ||
*/ | ||
private String pattern; | ||
|
||
/** | ||
* Locale to use for deserialization (if needed). | ||
*/ | ||
private String locale; | ||
|
||
/** | ||
* Names of properties to ignore. | ||
*/ | ||
private Set<String> ignoredProperties; | ||
|
||
/** | ||
* 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. | ||
*/ | ||
private boolean ignoreUnknown = false; | ||
|
||
/** | ||
* Bean identity informations | ||
*/ | ||
private IdentityDeserializationInfo identityInfo; | ||
|
||
/** | ||
* Bean type informations | ||
*/ | ||
private TypeDeserializationInfo typeInfo; | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>Getter for the field <code>pattern</code>.</p> | ||
*/ | ||
@Override | ||
public String getPattern() { | ||
return pattern; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>Setter for the field <code>pattern</code>.</p> | ||
*/ | ||
@Override | ||
public XMLDeserializerParameters setPattern(String pattern) { | ||
this.pattern = pattern; | ||
return this; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>Getter for the field <code>locale</code>.</p> | ||
*/ | ||
@Override | ||
public String getLocale() { | ||
return locale; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>Setter for the field <code>locale</code>.</p> | ||
*/ | ||
@Override | ||
public XMLDeserializerParameters setLocale(String locale) { | ||
this.locale = locale; | ||
return this; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>Getter for the field <code>ignoredProperties</code>.</p> | ||
*/ | ||
@Override | ||
public Set<String> getIgnoredProperties() { | ||
return ignoredProperties; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>addIgnoredProperty</p> | ||
*/ | ||
@Override | ||
public XMLDeserializerParameters addIgnoredProperty(String ignoredProperty) { | ||
if (null == ignoredProperties) { | ||
ignoredProperties = new HashSet<String>(); | ||
} | ||
ignoredProperties.add(ignoredProperty); | ||
return this; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>isIgnoreUnknown</p> | ||
*/ | ||
@Override | ||
public boolean isIgnoreUnknown() { | ||
return ignoreUnknown; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>Setter for the field <code>ignoreUnknown</code>.</p> | ||
*/ | ||
@Override | ||
public XMLDeserializerParameters setIgnoreUnknown(boolean ignoreUnknown) { | ||
this.ignoreUnknown = ignoreUnknown; | ||
return this; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>Getter for the field <code>identityInfo</code>.</p> | ||
*/ | ||
@Override | ||
public IdentityDeserializationInfo getIdentityInfo() { | ||
return identityInfo; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>Setter for the field <code>identityInfo</code>.</p> | ||
*/ | ||
@Override | ||
public XMLDeserializerParameters setIdentityInfo(IdentityDeserializationInfo identityInfo) { | ||
this.identityInfo = identityInfo; | ||
return this; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>Getter for the field <code>typeInfo</code>.</p> | ||
*/ | ||
@Override | ||
public TypeDeserializationInfo getTypeInfo() { | ||
return typeInfo; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* <p>Setter for the field <code>typeInfo</code>.</p> | ||
*/ | ||
@Override | ||
public XMLDeserializerParameters setTypeInfo(TypeDeserializationInfo typeInfo) { | ||
this.typeInfo = typeInfo; | ||
return this; | ||
} | ||
} |
Oops, something went wrong.