Coverage Report - com.lexicalscope.fluentreflection.IllegalArgumentRuntimeException
 
Classes in this File Line Coverage Branch Coverage Complexity
IllegalArgumentRuntimeException
42%
8/19
N/A
1
 
 1  
 package com.lexicalscope.fluentreflection;
 2  
 
 3  
 import static ch.lambdaj.Lambda.join;
 4  
 
 5  
 import java.lang.reflect.Field;
 6  
 import java.lang.reflect.Member;
 7  
 
 8  
 public class IllegalArgumentRuntimeException extends ReflectionRuntimeException {
 9  
     private static final long serialVersionUID = -2532532215028572886L;
 10  
 
 11  
     public IllegalArgumentRuntimeException() {
 12  0
         super();
 13  0
     }
 14  
 
 15  
     public IllegalArgumentRuntimeException(final String message, final Throwable cause) {
 16  8
         super(message, cause);
 17  8
     }
 18  
 
 19  
     public IllegalArgumentRuntimeException(final String message) {
 20  0
         super(message);
 21  0
     }
 22  
 
 23  
     public IllegalArgumentRuntimeException(final Throwable cause) {
 24  0
         super(cause);
 25  0
     }
 26  
 
 27  
     public IllegalArgumentRuntimeException(
 28  
             final IllegalArgumentException e,
 29  
             final Member member,
 30  
             final Object instance,
 31  
             final Object[] arguments) {
 32  8
         this(String.format(
 33  8
                 "when calling %s on %s with %s : %s",
 34  8
                 member,
 35  8
                 instance,
 36  8
                 join(arguments, ", "),
 37  16
                 e.getMessage()), e);
 38  
     }
 39  
 
 40  
     public IllegalArgumentRuntimeException(final IllegalArgumentException e, final Field field, final Object instance) {
 41  0
         this(String.format(
 42  0
                 "when reading %s on %s : %s",
 43  0
                 field,
 44  0
                 instance,
 45  0
                 e.getMessage()), e);
 46  
     }
 47  
 }