From d680f8c7f48b6a982c2cea0e8758716eee4807bc Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 22 Dec 2013 04:40:54 +0100 Subject: [configuration] initial batch of configuration keys, primarily for flag usages. --- src/core/lombok/Delegate.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/core/lombok/Delegate.java') 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. * @@ -45,6 +48,13 @@ import java.lang.annotation.Target; @Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.SOURCE) public @interface Delegate { + /** + * lombok configuration: {@code lombok.Delegate.flagUsage} = {@code WARNING} | {@code ERROR}. + * + * If set, any usage of {@code @Delegate} results in a warning / error. + */ + ConfigurationKey FLAG_USAGE = new ConfigurationKey("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 -- cgit