Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source
   * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
   * by the @authors tag. See the copyright.txt in the distribution for a
   * full listing of individual contributors.
   *
   * 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.hibernate.validator.internal.metadata.raw;
 
 import java.util.List;
 import java.util.Set;
 
 
 import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;

Represents the complete constraint related configuration of one Java type originating from one ConfigurationSource. Contains meta-data on constraints (field, method and class level) as well as meta data on default group sequences.

Author(s):
Gunnar Morling
 
 public class BeanConfiguration<T> {
 
 	private final ConfigurationSource source;
 
 	private final Class<T> beanClass;
 
 
 	private final List<Class<?>> defaultGroupSequence;
 
Creates a new bean configuration.

Parameters:
source The source of this configuration.
beanClass The type represented by this configuration.
constrainedElements The constraint elements representing this type's fields, methods etc.
defaultGroupSequence The default group sequence for the given type as configured by the given configuration source.
defaultGroupSequenceProvider The default group sequence provider for the given type as configured by the given configuration source.
 
 			Class<T> beanClass,
 			Set<? extends ConstrainedElementconstrainedElements,
 			List<Class<?>> defaultGroupSequence,
 			DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider) {
 
 		this. = source;
 		this. = beanClass;
 		this. = newHashSetconstrainedElements );
 		this. = defaultGroupSequence;
 		this. = defaultGroupSequenceProvider;
 	}
 
 		return ;
 	}
 
 	public Class<T> getBeanClass() {
 		return ;
 	}
 
 	}
 
 	public List<Class<?>> getDefaultGroupSequence() {
 	}
 
 	}
 
 	public String toString() {
 		return "BeanConfiguration [beanClass=" + .getSimpleName()
 				+ ", source=" + 
 				+ ", constrainedElements=" + 
 				+ ", defaultGroupSequence=" + 
 				+ ", defaultGroupSequenceProvider="
	}
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ( (  == null ) ? 0 : .hashCode() );
		result = prime * result + ( (  == null ) ? 0 : .hashCode() );
		return result;
	}
	public boolean equals(Object obj) {
		if ( this == obj ) {
			return true;
		}
		if ( obj == null ) {
			return false;
		}
		if ( getClass() != obj.getClass() ) {
			return false;
		}
		BeanConfiguration<?> other = (BeanConfiguration<?>) obj;
		if (  == null ) {
			if ( other.beanClass != null ) {
				return false;
			}
		}
		else if ( !.equalsother.beanClass ) ) {
			return false;
		}
		if (  != other.source ) {
			return false;
		}
		return true;
	}
New to GrepCode? Check out our FAQ X