diff options
Diffstat (limited to 'src/core/lombok/Delegate.java')
-rw-r--r-- | src/core/lombok/Delegate.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/lombok/Delegate.java b/src/core/lombok/Delegate.java index b599e4f0..14dba196 100644 --- a/src/core/lombok/Delegate.java +++ b/src/core/lombok/Delegate.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 The Project Lombok Authors. + * Copyright (C) 2010-2013 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,6 +26,9 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import lombok.core.FlagUsageType; +import lombok.core.configuration.ConfigurationKey; + /** * Put on any field to make lombok generate delegate methods that forward the call to this field. * @@ -46,6 +49,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) public @interface Delegate { /** + * lombok configuration: {@code lombok.Delegate.flagUsage} = {@code WARNING} | {@code ERROR}. + * + * If set, <em>any</em> usage of {@code @Delegate} results in a warning / error. + */ + ConfigurationKey<FlagUsageType> FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Delegate.flagUsage") {}; + + /** * Normally the type of the field is used as delegate type. However, to choose a different type to delegate, you can list one (or more) types here. Note that types with * type arguments can only be done as a field type. A solution for this is to create a private inner interface/class with the appropriate types extended, and possibly * with all methods you'd like to delegate listed, and then supply that class here. The field does not actually have to implement the type you're delegating; the |