wms-jax.validation

or.util;

import java.security.PrivilegedAction;
import javax.validation.ValidationException;

public class NewInstance<T>
  implements PrivilegedAction<T>
{
  private final Class<T> clazz;
  private final String message;
  
  public static <T> NewInstance<T> action(Class<T> clazz, String message)
  {
    return new NewInstance(clazz, message);
  }
  
  private NewInstance(Class<T> clazz, String message)
  {
    this.clazz = clazz;
    this.message = message;
  }
  
  public T run()
  {
    try
    {
      return (T)clazz.newInstance();
    }
    catch (InstantiationException e)
    {
      throw new ValidationException("Unable to instantiate " + message + ": " + clazz, e);
    }
    catch (IllegalAccessException e)
    {
      throw new ValidationException("Unable to instantiate " + clazz, e);
    }
    catch (RuntimeException e)
    {
      throw new ValidationException("Unable to instantiate " + clazz, e);
    }
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.util.NewInstance
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.util;

import java.beans.Introspector;
import java.lang.annotation.Annotation;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.lang.reflect.WildcardType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.validation.ValidationException;
import org.hibernate.validator.jtype.TypeUtils;

public class ReflectionHelper
{
  static <T> T getAnnotationParameter(Annotation annotation, String parameterName, Class<T> type)
  {
    try
    {
      Method m = annotation.getClass().getMethod(parameterName, new Class[0]);
      Object o = m.invoke(annotation, new Object[0]);
      if (o.getClass().getName().equals(type.getName())) {
        return (T)o;
      }
      String msg = "Wrong parameter type. Expected: " + type.getName() + " Actual: " + o.getClass().getName();
      throw new ValidationException(msg);
    }
    catch (NoSuchMethodException e)
    {
      String msg = "The specified annotation defines no parameter '" + parameterName + "'.";
      throw new ValidationException(msg, e);
    }
    catch (IllegalAccessException e)
    {
      String msg = "Unable to get '" + parameterName + "' from " + annotation.getClass().getName();
      throw new ValidationException(msg, e);
    }
    catch (InvocationTargetException e)
    {
      String msg = "Unable to get '" + parameterName + "' from " + annotation.getClass().getName();
      throw new ValidationException(msg, e);
    }
  }
  
  public static String getPropertyName(Member member)
  {
    String name = null;
    if ((member instanceof Field)) {
      name = member.getName();
    }
    if ((member instanceof Method))
    {
      String methodName = member.getName();
      if (methodName.startsWith("is")) {
        name = Introspector.decapitalize(methodName.substring(2));
      } else if (methodName.startsWith("has")) {
        name = Introspector.decapitalize(methodName.substring(3));
      } else if (methodName.startsWith("get")) {
        name = Introspector.decapitalize(methodName.substring(3));
      }
    }
    return name;
  }
  
  public static Class<?> getType(Member member)
  {
    Class<?> type = null;
    if ((member instanceof Field)) {
      type = ((Field)member).getType();
    }
    if ((member instanceof Method)) {
      type = ((Method)member).getReturnType();
    }
    return type;
  }
  
  public static Type typeOf(Member member)
  {
    Type type;
    if ((member instanceof Field))
    {
      type = ((Field)member).getGenericType();
    }
    else
    {
      Type type;
      if ((member instanceof Method)) {
        type = ((Method)member).getGenericReturnType();
      } else {
        throw new IllegalArgumentException("Member " + member + " is neither a field nor a method");
      }
    }
    Type type;
    if ((type instanceof TypeVariable)) {
      type = TypeUtils.getErasedType(type);
    }
    return type;
  }
  
  public static Object getValue(Member member, Object object)
  {
    Object value = null;
    if ((member instanceof Method))
    {
      Method method = (Method)member;
      try
      {
        value = method.invoke(object, new Object[0]);
      }
      catch (IllegalAccessException e)
      {
        throw new ValidationException("Unable to access " + method.getName(), e);
      }
      catch (InvocationTargetException e)
      {
        throw new ValidationException("Unable to access " + method.getName(), e);
      }
    }
    else if ((member instanceof Field))
    {
      Field field = (Field)member;
      try
      {
        value = field.get(object);
      }
      catch (IllegalAccessException e)
      {
        throw new ValidationException("Unable to access " + field.getName(), e);
      }
    }
    return value;
  }
  
  static void setAccessibility(Member member)
  {
    if ((!Modifier.isPublic(member.getModifiers())) || ((Modifier.isPublic(member.getModifiers())) && (Modifier.isAbstract(member.getModifiers())))) {
      ((AccessibleObject)member).setAccessible(true);
    }
  }
  
  public static Type getIndexedType(Type type)
  {
    Type indexedType = null;
    if ((isIterable(type)) && ((type instanceof ParameterizedType)))
    {
      ParameterizedType paramType = (ParameterizedType)type;
      indexedType = paramType.getActualTypeArguments()[0];
    }
    else if ((isMap(type)) && ((type instanceof ParameterizedType)))
    {
      ParameterizedType paramType = (ParameterizedType)type;
      indexedType = paramType.getActualTypeArguments()[1];
    }
    else if (TypeUtils.isArray(type))
    {
      indexedType = TypeUtils.getComponentType(type);
    }
    return indexedType;
  }
  
  public static boolean isIterable(Type type)
  {
    if (((type instanceof Class)) && (extendsOrImplements((Class)type, Iterable.class))) {
      return true;
    }
    if ((type instanceof ParameterizedType)) {
      return isIterable(((ParameterizedType)type).getRawType());
    }
    if ((type instanceof WildcardType))
    {
      Type[] upperBounds = ((WildcardType)type).getUpperBounds();
      return (upperBounds.length != 0) && (isIterable(upperBounds[0]));
    }
    return false;
  }
  
  public static boolean isMap(Type type)
  {
    if (((type instanceof Class)) && (extendsOrImplements((Class)type, Map.class))) {
      return true;
    }
    if ((type instanceof ParameterizedType)) {
      return isMap(((ParameterizedType)type).getRawType());
    }
    if ((type instanceof WildcardType))
    {
      Type[] upperBounds = ((WildcardType)type).getUpperBounds();
      return (upperBounds.length != 0) && (isMap(upperBounds[0]));
    }
    return false;
  }
  
  public static boolean isList(Type type)
  {
    if (((type instanceof Class)) && (extendsOrImplements((Class)type, List.class))) {
      return true;
    }
    if ((type instanceof ParameterizedType)) {
      return isList(((ParameterizedType)type).getRawType());
    }
    if ((type instanceof WildcardType))
    {
      Type[] upperBounds = ((WildcardType)type).getUpperBounds();
      return (upperBounds.length != 0) && (isList(upperBounds[0]));
    }
    return false;
  }
  
  public static Object getIndexedValue(Object value, Integer index)
  {
    if (value == null) {
      return null;
    }
    Type type = value.getClass();
    Iterator<?> iter;
    if (isIterable(type))
    {
      iter = ((Iterable)value).iterator();
    }
    else
    {
      Iterator<?> iter;
      if (TypeUtils.isArray(type))
      {
        List<?> arrayList = Arrays.asList(new Object[] { value });
        iter = arrayList.iterator();
      }
      else
      {
        return null;
      }
    }
    Iterator<?> iter;
    int i = 0;
    while (iter.hasNext())
    {
      Object o = iter.next();
      if (i == index.intValue()) {
        return o;
      }
      i++;
    }
    return null;
  }
  
  public static Object getMappedValue(Object value, Object key)
  {
    if ((value == null) || (!(value instanceof Map))) {
      return null;
    }
    Map<?, ?> map = (Map)value;
    
    return map.get(key);
  }
  
  static Method getMethod(Class<?> clazz, String methodName)
  {
    try
    {
      char[] string = methodName.toCharArray();
      string[0] = Character.toUpperCase(string[0]);
      methodName = new String(string);
      try
      {
        return clazz.getMethod("get" + methodName, new Class[0]);
      }
      catch (NoSuchMethodException e)
      {
        return clazz.getMethod("is" + methodName, new Class[0]);
      }
      return null;
    }
    catch (NoSuchMethodException e) {}
  }
  
  public static Class<?> boxedType(Type primitiveType)
  {
    if ((!(primitiveType instanceof Class)) && (!((Class)primitiveType).isPrimitive())) {
      throw new IllegalArgumentException(primitiveType.getClass() + "has to be a primitive type");
    }
    if (primitiveType == Boolean.TYPE) {
      return Boolean.class;
    }
    if (primitiveType == Character.TYPE) {
      return Character.class;
    }
    if (primitiveType == Double.TYPE) {
      return Double.class;
    }
    if (primitiveType == Float.TYPE) {
      return Float.class;
    }
    if (primitiveType == Long.TYPE) {
      return Long.class;
    }
    if (primitiveType == Integer.TYPE) {
      return Integer.class;
    }
    if (primitiveType == Short.TYPE) {
      return Short.class;
    }
    if (primitiveType == Byte.TYPE) {
      return Byte.class;
    }
    throw new RuntimeException("Unhandled primitive type.");
  }
  
  public static void computeClassHierarchy(Class<?> clazz, List<Class<?>> classes)
  {
    for (Class current = clazz; current != null; current = current.getSuperclass())
    {
      if (classes.contains(current)) {
        return;
      }
      classes.add(current);
      for (Class currentInterface : current.getInterfaces()) {
        computeClassHierarchy(currentInterface, classes);
      }
    }
  }
  
  private static boolean extendsOrImplements(Class<?> clazz, Class<?> superClassOrInterface)
  {
    List<Class<?>> classes = new ArrayList();
    computeClassHierarchy(clazz, classes);
    return classes.contains(superClassOrInterface);
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.util.ReflectionHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.util;

import java.lang.reflect.Member;
import java.security.PrivilegedAction;

public class SetAccessibility
  implements PrivilegedAction<Object>
{
  private final Member member;
  
  public static SetAccessibility action(Member member)
  {
    return new SetAccessibility(member);
  }
  
  private SetAccessibility(Member member)
  {
    this.member = member;
  }
  
  public Object run()
  {
    ReflectionHelper.setAccessibility(member);
    return member;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.util.SetAccessibility
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.util;

import java.lang.annotation.Annotation;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.validation.ConstraintValidator;
import javax.validation.ValidationException;
import org.hibernate.validator.jtype.TypeUtils;

public class ValidatorTypeHelper
{
  private static final int VALIDATOR_TYPE_INDEX = 1;
  
  public static <T extends Annotation> Map<Type, Class<? extends ConstraintValidator<?, ?>>> getValidatorsTypes(List<Class<? extends ConstraintValidator<T, ?>>> validators)
  {
    if ((validators == null) || (validators.size() == 0)) {
      throw new ValidationException("No ConstraintValidators associated to @Constraint");
    }
    Map<Type, Class<? extends ConstraintValidator<?, ?>>> validatorsTypes = new HashMap();
    for (Class<? extends ConstraintValidator<?, ?>> validator : validators) {
      validatorsTypes.put(extractType(validator), validator);
    }
    return validatorsTypes;
  }
  
  private static Type extractType(Class<? extends ConstraintValidator<?, ?>> validator)
  {
    Map<Type, Type> resolvedTypes = new HashMap();
    Type constraintValidatorType = resolveTypes(resolvedTypes, validator);
    
    Type validatorType = ((ParameterizedType)constraintValidatorType).getActualTypeArguments()[1];
    if (validatorType == null) {
      throw new ValidationException("null is an invalid type for a constraint validator.");
    }
    if ((validatorType instanceof GenericArrayType)) {
      validatorType = TypeUtils.getArrayType(TypeUtils.getComponentType(validatorType));
    }
    while (resolvedTypes.containsKey(validatorType)) {
      validatorType = (Type)resolvedTypes.get(validatorType);
    }
    return validatorType;
  }
  
  private static Type resolveTypes(Map<Type, Type> resolvedTypes, Type type)
  {
    if (type == null) {
      return null;
    }
    if ((type instanceof Class))
    {
      Class clazz = (Class)type;
      Type returnedType = resolveTypeForClassAndHierarchy(resolvedTypes, clazz);
      if (returnedType != null) {
        return returnedType;
      }
    }
    else if ((type instanceof ParameterizedType))
    {
      ParameterizedType paramType = (ParameterizedType)type;
      if (!(paramType.getRawType() instanceof Class)) {
        return null;
      }
      Class<?> rawType = (Class)paramType.getRawType();
      
      TypeVariable<?>[] originalTypes = rawType.getTypeParameters();
      Type[] partiallyResolvedTypes = paramType.getActualTypeArguments();
      int nbrOfParams = originalTypes.length;
      for (int i = 0; i < nbrOfParams; i++) {
        resolvedTypes.put(originalTypes[i], partiallyResolvedTypes[i]);
      }
      if (rawType.equals(ConstraintValidator.class)) {
        return type;
      }
      Type returnedType = resolveTypeForClassAndHierarchy(resolvedTypes, rawType);
      if (returnedType != null) {
        return returnedType;
      }
    }
    return null;
  }
  
  private static Type resolveTypeForClassAndHierarchy(Map<Type, Type> resolvedTypes, Class<?> clazz)
  {
    Type returnedType = resolveTypes(resolvedTypes, clazz.getGenericSuperclass());
    if (returnedType != null) {
      return returnedType;
    }
    for (Type genericInterface : clazz.getGenericInterfaces())
    {
      returnedType = resolveTypes(resolvedTypes, genericInterface);
      if (returnedType != null) {
        return returnedType;
      }
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.util.ValidatorTypeHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.util;

import java.net.URL;
import java.util.jar.Attributes;
import java.util.jar.Attributes.Name;
import java.util.jar.Manifest;
import org.slf4j.Logger;

public class Version
{
  private static final Logger log = ;
  
  public static void touch() {}
  
  static
  {
    Class clazz = Version.class;
    String classFileName = clazz.getSimpleName() + ".class";
    String classFilePath = clazz.getCanonicalName().replace('.', '/') + ".class";
    
    String pathToThisClass = clazz.getResource(classFileName).toString();
    
    String pathToManifest = pathToThisClass.substring(0, pathToThisClass.indexOf(classFilePath) - 1) + "/META-INF/MANIFEST.MF";
    
    log.trace("Manifest file {}", pathToManifest);
    Manifest manifest = null;
    try
    {
      manifest = new Manifest(new URL(pathToManifest).openStream());
    }
    catch (Exception e)
    {
      log.warn("Unable to determine version of Hibernate Validator");
    }
    String version;
    String version;
    if (manifest == null) {
      version = "?";
    } else {
      version = manifest.getMainAttributes().getValue(Attributes.Name.IMPLEMENTATION_VERSION);
    }
    log.info("Hibernate Validator {}", version);
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.util.Version
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="annotationType", propOrder={"element"})
public class AnnotationType
{
  protected List<ElementType> element;
  
  public List<ElementType> getElement()
  {
    if (element == null) {
      element = new ArrayList();
    }
    return element;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.AnnotationType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="beanType", propOrder={"classType", "field", "getter"})
public class BeanType
{
  @XmlElement(name="class")
  protected ClassType classType;
  protected List<FieldType> field;
  protected List<GetterType> getter;
  @XmlAttribute(name="class", required=true)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String clazz;
  @XmlAttribute(name="ignore-annotations")
  protected Boolean ignoreAnnotations;
  
  public ClassType getClassType()
  {
    return classType;
  }
  
  public void setClassType(ClassType value)
  {
    classType = value;
  }
  
  public List<FieldType> getField()
  {
    if (field == null) {
      field = new ArrayList();
    }
    return field;
  }
  
  public List<GetterType> getGetter()
  {
    if (getter == null) {
      getter = new ArrayList();
    }
    return getter;
  }
  
  public String getClazz()
  {
    return clazz;
  }
  
  public void setClazz(String value)
  {
    clazz = value;
  }
  
  public Boolean isIgnoreAnnotations()
  {
    return ignoreAnnotations;
  }
  
  public void setIgnoreAnnotations(Boolean value)
  {
    ignoreAnnotations = value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.BeanType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="classType", propOrder={"groupSequence", "constraint"})
public class ClassType
{
  @XmlElement(name="group-sequence")
  protected GroupSequenceType groupSequence;
  protected List<ConstraintType> constraint;
  @XmlAttribute(name="ignore-annotations")
  protected Boolean ignoreAnnotations;
  
  public GroupSequenceType getGroupSequence()
  {
    return groupSequence;
  }
  
  public void setGroupSequence(GroupSequenceType value)
  {
    groupSequence = value;
  }
  
  public List<ConstraintType> getConstraint()
  {
    if (constraint == null) {
      constraint = new ArrayList();
    }
    return constraint;
  }
  
  public Boolean isIgnoreAnnotations()
  {
    return ignoreAnnotations;
  }
  
  public void setIgnoreAnnotations(Boolean value)
  {
    ignoreAnnotations = value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.ClassType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="constraint-definitionType", propOrder={"validatedBy"})
public class ConstraintDefinitionType
{
  @XmlElement(name="validated-by", required=true)
  protected ValidatedByType validatedBy;
  @XmlAttribute(required=true)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String annotation;
  
  public ValidatedByType getValidatedBy()
  {
    return validatedBy;
  }
  
  public void setValidatedBy(ValidatedByType value)
  {
    validatedBy = value;
  }
  
  public String getAnnotation()
  {
    return annotation;
  }
  
  public void setAnnotation(String value)
  {
    annotation = value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.ConstraintDefinitionType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="constraint-mappingsType", propOrder={"defaultPackage", "bean", "constraintDefinition"})
public class ConstraintMappingsType
{
  @XmlElement(name="default-package")
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String defaultPackage;
  protected List<BeanType> bean;
  @XmlElement(name="constraint-definition")
  protected List<ConstraintDefinitionType> constraintDefinition;
  
  public String getDefaultPackage()
  {
    return defaultPackage;
  }
  
  public void setDefaultPackage(String value)
  {
    defaultPackage = value;
  }
  
  public List<BeanType> getBean()
  {
    if (bean == null) {
      bean = new ArrayList();
    }
    return bean;
  }
  
  public List<ConstraintDefinitionType> getConstraintDefinition()
  {
    if (constraintDefinition == null) {
      constraintDefinition = new ArrayList();
    }
    return constraintDefinition;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.ConstraintMappingsType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="constraintType", propOrder={"message", "groups", "payload", "element"})
public class ConstraintType
{
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String message;
  protected GroupsType groups;
  protected PayloadType payload;
  protected List<ElementType> element;
  @XmlAttribute(required=true)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String annotation;
  
  public String getMessage()
  {
    return message;
  }
  
  public void setMessage(String value)
  {
    message = value;
  }
  
  public GroupsType getGroups()
  {
    return groups;
  }
  
  public void setGroups(GroupsType value)
  {
    groups = value;
  }
  
  public PayloadType getPayload()
  {
    return payload;
  }
  
  public void setPayload(PayloadType value)
  {
    payload = value;
  }
  
  public List<ElementType> getElement()
  {
    if (element == null) {
      element = new ArrayList();
    }
    return element;
  }
  
  public String getAnnotation()
  {
    return annotation;
  }
  
  public void setAnnotation(String value)
  {
    annotation = value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.ConstraintType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="elementType", propOrder={"content"})
public class ElementType
{
  @XmlElementRefs({@javax.xml.bind.annotation.XmlElementRef(name="value", namespace="http://jboss.org/xml/ns/javax/validation/mapping", type=javax.xml.bind.JAXBElement.class), @javax.xml.bind.annotation.XmlElementRef(name="annotation", namespace="http://jboss.org/xml/ns/javax/validation/mapping", type=javax.xml.bind.JAXBElement.class)})
  @XmlMixed
  protected List<Serializable> content;
  @XmlAttribute(required=true)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String name;
  
  public List<Serializable> getContent()
  {
    if (content == null) {
      content = new ArrayList();
    }
    return content;
  }
  
  public String getName()
  {
    return name;
  }
  
  public void setName(String value)
  {
    name = value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.ElementType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="fieldType", propOrder={"valid", "constraint"})
public class FieldType
{
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String valid;
  protected List<ConstraintType> constraint;
  @XmlAttribute(name="ignore-annotations")
  protected Boolean ignoreAnnotations;
  @XmlAttribute(required=true)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String name;
  
  public String getValid()
  {
    return valid;
  }
  
  public void setValid(String value)
  {
    valid = value;
  }
  
  public List<ConstraintType> getConstraint()
  {
    if (constraint == null) {
      constraint = new ArrayList();
    }
    return constraint;
  }
  
  public Boolean isIgnoreAnnotations()
  {
    return ignoreAnnotations;
  }
  
  public void setIgnoreAnnotations(Boolean value)
  {
    ignoreAnnotations = value;
  }
  
  public String getName()
  {
    return name;
  }
  
  public void setName(String value)
  {
    name = value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.FieldType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="getterType", propOrder={"valid", "constraint"})
public class GetterType
{
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String valid;
  protected List<ConstraintType> constraint;
  @XmlAttribute(name="ignore-annotations")
  protected Boolean ignoreAnnotations;
  @XmlAttribute(required=true)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String name;
  
  public String getValid()
  {
    return valid;
  }
  
  public void setValid(String value)
  {
    valid = value;
  }
  
  public List<ConstraintType> getConstraint()
  {
    if (constraint == null) {
      constraint = new ArrayList();
    }
    return constraint;
  }
  
  public Boolean isIgnoreAnnotations()
  {
    return ignoreAnnotations;
  }
  
  public void setIgnoreAnnotations(Boolean value)
  {
    ignoreAnnotations = value;
  }
  
  public String getName()
  {
    return name;
  }
  
  public void setName(String value)
  {
    name = value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.GetterType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="groupSequenceType", propOrder={"value"})
public class GroupSequenceType
{
  @XmlElementRef(name="value", namespace="http://jboss.org/xml/ns/javax/validation/mapping", type=JAXBElement.class)
  protected List<JAXBElement<String>> value;
  
  public List<JAXBElement<String>> getValue()
  {
    if (value == null) {
      value = new ArrayList();
    }
    return value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.GroupSequenceType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="groupsType", propOrder={"value"})
public class GroupsType
{
  @XmlElementRef(name="value", namespace="http://jboss.org/xml/ns/javax/validation/mapping", type=JAXBElement.class)
  protected List<JAXBElement<String>> value;
  
  public List<JAXBElement<String>> getValue()
  {
    if (value == null) {
      value = new ArrayList();
    }
    return value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.GroupsType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;

@XmlRegistry
public class ObjectFactory
{
  private static final QName _ValidationConfigTypeConstraintMapping_QNAME = new QName("http://jboss.org/xml/ns/javax/validation/configuration", "constraint-mapping");
  private static final QName _ConstraintMappings_QNAME = new QName("http://jboss.org/xml/ns/javax/validation/mapping", "constraint-mappings");
  private static final QName _ValidationConfig_QNAME = new QName("http://jboss.org/xml/ns/javax/validation/configuration", "validation-config");
  private static final QName _ValidatedByTypeValue_QNAME = new QName("http://jboss.org/xml/ns/javax/validation/mapping", "value");
  private static final QName _ElementTypeAnnotation_QNAME = new QName("http://jboss.org/xml/ns/javax/validation/mapping", "annotation");
  
  public ValidationConfigType createValidationConfigType()
  {
    return new ValidationConfigType();
  }
  
  public ConstraintMappingsType createConstraintMappingsType()
  {
    return new ConstraintMappingsType();
  }
  
  public GetterType createGetterType()
  {
    return new GetterType();
  }
  
  public ConstraintDefinitionType createConstraintDefinitionType()
  {
    return new ConstraintDefinitionType();
  }
  
  public ElementType createElementType()
  {
    return new ElementType();
  }
  
  public GroupsType createGroupsType()
  {
    return new GroupsType();
  }
  
  public GroupSequenceType createGroupSequenceType()
  {
    return new GroupSequenceType();
  }
  
  public BeanType createBeanType()
  {
    return new BeanType();
  }
  
  public ConstraintType createConstraintType()
  {
    return new ConstraintType();
  }
  
  public FieldType createFieldType()
  {
    return new FieldType();
  }
  
  public ValidatedByType createValidatedByType()
  {
    return new ValidatedByType();
  }
  
  public ClassType createClassType()
  {
    return new ClassType();
  }
  
  public AnnotationType createAnnotationType()
  {
    return new AnnotationType();
  }
  
  public PayloadType createPayloadType()
  {
    return new PayloadType();
  }
  
  public PropertyType createPropertyType()
  {
    return new PropertyType();
  }
  
  @XmlElementDecl(namespace="http://jboss.org/xml/ns/javax/validation/configuration", name="constraint-mapping", scope=ValidationConfigType.class)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  public JAXBElement<String> createValidationConfigTypeConstraintMapping(String value)
  {
    return new JAXBElement(_ValidationConfigTypeConstraintMapping_QNAME, String.class, ValidationConfigType.class, value);
  }
  
  @XmlElementDecl(namespace="http://jboss.org/xml/ns/javax/validation/mapping", name="constraint-mappings")
  public JAXBElement<ConstraintMappingsType> createConstraintMappings(ConstraintMappingsType value)
  {
    return new JAXBElement(_ConstraintMappings_QNAME, ConstraintMappingsType.class, null, value);
  }
  
  @XmlElementDecl(namespace="http://jboss.org/xml/ns/javax/validation/configuration", name="validation-config")
  public JAXBElement<ValidationConfigType> createValidationConfig(ValidationConfigType value)
  {
    return new JAXBElement(_ValidationConfig_QNAME, ValidationConfigType.class, null, value);
  }
  
  @XmlElementDecl(namespace="http://jboss.org/xml/ns/javax/validation/mapping", name="value", scope=ValidatedByType.class)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  public JAXBElement<String> createValidatedByTypeValue(String value)
  {
    return new JAXBElement(_ValidatedByTypeValue_QNAME, String.class, ValidatedByType.class, value);
  }
  
  @XmlElementDecl(namespace="http://jboss.org/xml/ns/javax/validation/mapping", name="annotation", scope=ElementType.class)
  public JAXBElement<AnnotationType> createElementTypeAnnotation(AnnotationType value)
  {
    return new JAXBElement(_ElementTypeAnnotation_QNAME, AnnotationType.class, ElementType.class, value);
  }
  
  @XmlElementDecl(namespace="http://jboss.org/xml/ns/javax/validation/mapping", name="value", scope=ElementType.class)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  public JAXBElement<String> createElementTypeValue(String value)
  {
    return new JAXBElement(_ValidatedByTypeValue_QNAME, String.class, ElementType.class, value);
  }
  
  @XmlElementDecl(namespace="http://jboss.org/xml/ns/javax/validation/mapping", name="value", scope=PayloadType.class)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  public JAXBElement<String> createPayloadTypeValue(String value)
  {
    return new JAXBElement(_ValidatedByTypeValue_QNAME, String.class, PayloadType.class, value);
  }
  
  @XmlElementDecl(namespace="http://jboss.org/xml/ns/javax/validation/mapping", name="value", scope=GroupsType.class)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  public JAXBElement<String> createGroupsTypeValue(String value)
  {
    return new JAXBElement(_ValidatedByTypeValue_QNAME, String.class, GroupsType.class, value);
  }
  
  @XmlElementDecl(namespace="http://jboss.org/xml/ns/javax/validation/mapping", name="value", scope=GroupSequenceType.class)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  public JAXBElement<String> createGroupSequenceTypeValue(String value)
  {
    return new JAXBElement(_ValidatedByTypeValue_QNAME, String.class, GroupSequenceType.class, value);
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.ObjectFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;

@XmlSchema(namespace="http://jboss.org/xml/ns/javax/validation/mapping", elementFormDefault=XmlNsForm.QUALIFIED)
interface package-info {}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.package-info
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="payloadType", propOrder={"value"})
public class PayloadType
{
  @XmlElementRef(name="value", namespace="http://jboss.org/xml/ns/javax/validation/mapping", type=JAXBElement.class)
  protected List<JAXBElement<String>> value;
  
  public List<JAXBElement<String>> getValue()
  {
    if (value == null) {
      value = new ArrayList();
    }
    return value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.PayloadType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="propertyType", namespace="http://jboss.org/xml/ns/javax/validation/configuration", propOrder={"value"})
public class PropertyType
{
  @XmlValue
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String value;
  @XmlAttribute(required=true)
  @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  protected String name;
  
  public String getValue()
  {
    return value;
  }
  
  public void setValue(String value)
  {
    this.value = value;
  }
  
  public String getName()
  {
    return name;
  }
  
  public void setName(String value)
  {
    name = value;
  }
}

/* Location:
 * Qualified Name:     org.hibernate.validator.xml.PropertyType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="validated-byType", propOrder={"value"})
public class ValidatedByType
{
  @XmlElementRef(name="value", namespace="http://jboss.org/xml/ns/javax/validation/mapping", type=JAXBElement.class)
  protected List<JAXBElement<String>> value;
  @XmlAttribute(name="include-existing-validators")
  protected Boolean includeExistingValidators;
  
  public List<JAXBElement<String>> getValue()
  {
    if (value == null) {
      value
1 2 3 4 5 6 7 8 9 10 11

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd