summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/exceptions/NotAProxyException.java
blob: f3e40a7d725a5fc5c01a8230845176da4aeba451 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package ftbsc.lll.exceptions;

import ftbsc.lll.processor.annotations.Find;

/**
 * Thrown when a method is annotated with {@link Find} but does not
 * return a known instance of {@link ftbsc.lll.proxies.AbstractProxy}.
 * @since 0.5.0
 */
public class NotAProxyException extends RuntimeException {

   /**
    * Constructs an exception for the specified method.
    * @param parent the FQN of the class containing the method
    * @param method the name of the method wrongly annotated
    */
   public NotAProxyException(String parent, String method) {
      super(String.format("Annotated field %s::%s does not return a proxy!", parent, method));
   }
}