* See HV-113.
*/
private void initDefaultGroupSequence() {
List<Class<?>> groupSequence = new ArrayList<Class<?>>();
GroupSequenceProvider groupSequenceProviderAnnotation = beanClass.getAnnotation( GroupSequenceProvider.class );
GroupSequence groupSequenceAnnotation = beanClass.getAnnotation( GroupSequence.class );
if ( groupSequenceAnnotation != null && groupSequenceProviderAnnotation != null ) {
throw new GroupDefinitionException(
"GroupSequence and GroupSequenceProvider annotations cannot be used at the same time"
);
}
if ( groupSequenceProviderAnnotation != null ) {
defaultGroupSequenceProvider = newGroupSequenceProviderInstance( groupSequenceProviderAnnotation.value() );
}
else if ( groupSequenceAnnotation != null ) {
groupSequence.addAll( Arrays.asList( groupSequenceAnnotation.value() ) );
setDefaultGroupSequence( groupSequence );
}
else {
groupSequence.add( beanClass );
setDefaultGroupSequence( groupSequence );