diff options
author | zaaarf <zaaarf@proton.me> | 2023-03-18 19:30:31 +0100 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-03-18 19:30:31 +0100 |
commit | 0e1e1bd3a470e44a79fb3c917477d6f865ff5257 (patch) | |
tree | 91f96532a27a7db9a019a5caa13eb3d37264c27e /src/main/java/ftbsc/lll/exceptions | |
parent | c446cca43eaef4200e45c77c88c6ab4e46599a01 (diff) |
feat: anonymous and inner class handling, implemented united @Find
Diffstat (limited to 'src/main/java/ftbsc/lll/exceptions')
-rw-r--r-- | src/main/java/ftbsc/lll/exceptions/NotAProxyException.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/java/ftbsc/lll/exceptions/NotAProxyException.java b/src/main/java/ftbsc/lll/exceptions/NotAProxyException.java new file mode 100644 index 0000000..4c2eeaa --- /dev/null +++ b/src/main/java/ftbsc/lll/exceptions/NotAProxyException.java @@ -0,0 +1,21 @@ +package ftbsc.lll.exceptions; + +import ftbsc.lll.processor.annotations.Find; +import ftbsc.lll.proxies.FieldProxy; +import ftbsc.lll.proxies.MethodProxy; + +/** + * Thrown when a method is annotated with {@link Find} but does not + * return a {@link MethodProxy} or a {@link FieldProxy} + */ +public class NotAProxyException extends RuntimeException { + + /** + * Constructs a 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 method %s::%s does not return a proxy!", parent, method)); + } +} |