message.append( Arrays.toString( args ) );
message.append( "\nConstraint violations: " );
int i = 1;
for ( ConstraintViolation<?> constraintViolation : violations ) {
ElementDescriptor elementDescriptor = locateElementDescriptor( constraintViolation );
message.append( "\n (" );
message.append( i );
message.append( ")" );
if ( elementDescriptor != null ) {
message.append( " Kind: " );
message.append( elementDescriptor.getKind() );
if ( elementDescriptor instanceof ParameterDescriptor ) {
message.append( "\n parameter index: " );
message.append( ( (ParameterDescriptor) elementDescriptor ).getIndex() );
}
}