All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.nmorel.gwtjackson.rebind.bean.BeanInfo Maven / Gradle / Ivy

Go to download

gwt-jackson is a GWT JSON serializer/deserializer mechanism based on Jackson annotations

There is a newer version: 0.15.4
Show newest version
/*
 * 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 com.github.nmorel.gwtjackson.rebind.bean;

import java.util.List;
import java.util.Map;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.github.nmorel.gwtjackson.rebind.property.PropertyInfo;
import com.google.gwt.core.ext.typeinfo.JAbstractMethod;
import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.JParameter;
import com.google.gwt.thirdparty.guava.common.base.Optional;
import com.google.gwt.thirdparty.guava.common.collect.ImmutableList;
import com.google.gwt.thirdparty.guava.common.collect.ImmutableMap;
import com.google.gwt.thirdparty.guava.common.collect.ImmutableSet;

/**
 * 

BeanInfo class.

* * @author Nicolas Morel * @version $Id: $ */ public final class BeanInfo { private final JClassType type; private final ImmutableList parameterizedTypes; /*#### Instantiation properties ####*/ private final Optional builder; private final Optional creatorMethod; private final ImmutableMap creatorParameters; private final boolean creatorDefaultConstructor; private final boolean creatorDelegation; private final Optional typeInfo; private final Optional valuePropertyInfo; private final Optional anyGetterPropertyInfo; private final Optional anySetterPropertyInfo; /*#### Visibility properties ####*/ private final ImmutableSet ignoredFields; private final JsonAutoDetect.Visibility fieldVisibility; private final JsonAutoDetect.Visibility getterVisibility; private final JsonAutoDetect.Visibility isGetterVisibility; private final JsonAutoDetect.Visibility setterVisibility; private final JsonAutoDetect.Visibility creatorVisibility; private final boolean ignoreUnknown; /*#### Ordering properties ####*/ private final ImmutableList propertyOrderList; private final boolean propertyOrderAlphabetic; /*#### Identity info ####*/ private final Optional identityInfo; /*#### Inclusion info ####*/ private final Optional include; BeanInfo( JClassType type, List parameterizedTypes, Optional builder, Optional creatorMethod, Map creatorParameters, boolean creatorDefaultConstructor, boolean creatorDelegation, Optional typeInfo, Optional valuePropertyInfo, Optional anyGetterPropertyInfo, Optional anySetterPropertyInfo, Set ignoredFields, Visibility fieldVisibility, Visibility getterVisibility, Visibility isGetterVisibility, Visibility setterVisibility, Visibility creatorVisibility, boolean ignoreUnknown, List propertyOrderList, boolean propertyOrderAlphabetic, Optional identityInfo, Optional include ) { this.type = type; this.parameterizedTypes = ImmutableList.copyOf( parameterizedTypes ); this.builder = builder; this.creatorMethod = creatorMethod; this.creatorParameters = ImmutableMap.copyOf( creatorParameters ); this.creatorDefaultConstructor = creatorDefaultConstructor; this.creatorDelegation = creatorDelegation; this.typeInfo = typeInfo; this.valuePropertyInfo = valuePropertyInfo; this.anyGetterPropertyInfo = anyGetterPropertyInfo; this.anySetterPropertyInfo = anySetterPropertyInfo; this.ignoredFields = ImmutableSet.copyOf( ignoredFields ); this.fieldVisibility = fieldVisibility; this.getterVisibility = getterVisibility; this.isGetterVisibility = isGetterVisibility; this.setterVisibility = setterVisibility; this.creatorVisibility = creatorVisibility; this.ignoreUnknown = ignoreUnknown; this.propertyOrderList = ImmutableList.copyOf( propertyOrderList ); this.propertyOrderAlphabetic = propertyOrderAlphabetic; this.identityInfo = identityInfo; this.include = include; } /** *

Getter for the field type.

* * @return a {@link com.google.gwt.core.ext.typeinfo.JClassType} object. */ public JClassType getType() { return type; } /** *

Getter for the field parameterizedTypes.

* * @return a {@link com.google.gwt.thirdparty.guava.common.collect.ImmutableList} object. */ public ImmutableList getParameterizedTypes() { return parameterizedTypes; } /** *

Getter for the field builder.

* * @return a {@link com.google.gwt.thirdparty.guava.common.base.Optional} object. */ public Optional getBuilder() { return builder; } /** *

Getter for the field creatorMethod.

* * @return a {@link com.google.gwt.thirdparty.guava.common.base.Optional} object. */ public Optional getCreatorMethod() { return creatorMethod; } /** *

Getter for the field creatorParameters.

* * @return a {@link com.google.gwt.thirdparty.guava.common.collect.ImmutableMap} object. */ public ImmutableMap getCreatorParameters() { return creatorParameters; } /** *

isCreatorDefaultConstructor

* * @return a boolean. */ public boolean isCreatorDefaultConstructor() { return creatorDefaultConstructor; } /** *

isCreatorDelegation

* * @return a boolean. */ public boolean isCreatorDelegation() { return creatorDelegation; } /** *

Getter for the field typeInfo.

* * @return a {@link com.google.gwt.thirdparty.guava.common.base.Optional} object. */ public Optional getTypeInfo() { return typeInfo; } /** *

Getter for the field valuePropertyInfo.

* * @return a {@link com.google.gwt.thirdparty.guava.common.base.Optional} object. */ public Optional getValuePropertyInfo() { return valuePropertyInfo; } /** *

Getter for the field anyGetterPropertyInfo.

* * @return a {@link com.google.gwt.thirdparty.guava.common.base.Optional} object. */ public Optional getAnyGetterPropertyInfo() { return anyGetterPropertyInfo; } /** *

Getter for the field anySetterPropertyInfo.

* * @return a {@link com.google.gwt.thirdparty.guava.common.base.Optional} object. */ public Optional getAnySetterPropertyInfo() { return anySetterPropertyInfo; } /** *

Getter for the field ignoredFields.

* * @return a {@link com.google.gwt.thirdparty.guava.common.collect.ImmutableSet} object. */ public ImmutableSet getIgnoredFields() { return ignoredFields; } /** *

Getter for the field fieldVisibility.

* * @return a {@link com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility} object. */ public Visibility getFieldVisibility() { return fieldVisibility; } /** *

Getter for the field getterVisibility.

* * @return a {@link com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility} object. */ public Visibility getGetterVisibility() { return getterVisibility; } /** *

Getter for the field isGetterVisibility.

* * @return a {@link com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility} object. */ public Visibility getIsGetterVisibility() { return isGetterVisibility; } /** *

Getter for the field setterVisibility.

* * @return a {@link com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility} object. */ public Visibility getSetterVisibility() { return setterVisibility; } /** *

Getter for the field creatorVisibility.

* * @return a {@link com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility} object. */ public Visibility getCreatorVisibility() { return creatorVisibility; } /** *

isIgnoreUnknown

* * @return a boolean. */ public boolean isIgnoreUnknown() { return ignoreUnknown; } /** *

Getter for the field propertyOrderList.

* * @return a {@link com.google.gwt.thirdparty.guava.common.collect.ImmutableList} object. */ public ImmutableList getPropertyOrderList() { return propertyOrderList; } /** *

isPropertyOrderAlphabetic

* * @return a boolean. */ public boolean isPropertyOrderAlphabetic() { return propertyOrderAlphabetic; } /** *

Getter for the field identityInfo.

* * @return a {@link com.google.gwt.thirdparty.guava.common.base.Optional} object. */ public Optional getIdentityInfo() { return identityInfo; } /** *

Getter for the field include.

* * @return a {@link com.google.gwt.thirdparty.guava.common.base.Optional} object. */ public Optional getInclude() { return include; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy