Conversation
|
Hi @jvz, Don't worry, I have seen your PR, but until the end of the week I don't really have the time to review it. |
|
I'm trying to get the build to work 😆 |
|
The MacOS failure is due to a problem in the Maven Wrapper script. |
|
Now it seems there's a Windows-specific build issue related to TLS settings. |
| /** | ||
| * Marks another annotation as one providing a name for an object. The name is obtained from | ||
| * the annotation element named {@code value}. This element can be a {@code String} or {@code String[]}. | ||
| * When specified as an array, the first element is used. | ||
| */ |
There was a problem hiding this comment.
Marks another annotation as one providing a name for an object.
Oookay... PluginElement, PluginValue, etc. are NameProviders. Got it.
The name is obtained from the annotation element named
value.
This element can be aStringorString[].
When specified as an array, the first element is used.
I am totally lost here. Would you mind elaborating on this.
There was a problem hiding this comment.
I can try. The idea here is that an annotation like @Named(String[] value) can specify both the name (the first element of the array) and additional aliases (the rest of the array). However, some annotations like @PluginAliases(String[] value) use the whole array.
There was a problem hiding this comment.
Right! Got it!
| /** | |
| * Marks another annotation as one providing a name for an object. The name is obtained from | |
| * the annotation element named {@code value}. This element can be a {@code String} or {@code String[]}. | |
| * When specified as an array, the first element is used. | |
| */ | |
| /** | |
| * Marks another annotation as one providing a name for an object. | |
| * The name is obtained from the annotation element named {@code value}. | |
| * This element can be a {@code String} or {@code String[]}. | |
| * When specified as an array, the first element is used. | |
| * <h2>Examples:</h2> | |
| * <ul> | |
| * <li>{@code @NameProvider @Named(String value)} - {@code value} will be used as the name | |
| * <li>{@code @NameProvider @PluginAliases(String[] value)} - {@code value[0]} will be used as the name | |
| * </ul> | |
| */ |
| @NameProvider(NamedQualifierNameProvider.class) | ||
| @AliasesProvider(NamedQualifierNameProvider.class) | ||
| @NameProvider | ||
| @AliasesProvider(offset = 1) |
There was a problem hiding this comment.
I'm confused by offset and its function. (Yes, I've read its Javadoc.) Would you mind explaining it a little bit more, please?
|
|
||
| /** | ||
| * Annotations to separate {@link org.apache.logging.log4j.plugins.name.NameProvider} names into namespaces. | ||
| * Annotations to separate {@link NameProvider} names into namespaces. |
There was a problem hiding this comment.
What does "NameProvider names" mean? "Names provided by NameProviders"?
| * For example, the {@linkplain Configurable Core namespace} is used with the {@link Node} API, while the TypeConverter | ||
| * namespace is used with the {@link org.apache.logging.log4j.plugins.convert.TypeConverter} API. |
There was a problem hiding this comment.
I think this example needs to be explained more.
| _Injectable methods_ are methods annotated with `@Inject` or are not annotated with a factory annotation and have at least one parameter annotated with a qualifier annotation. | ||
| _Injectable constructors_ are constructors annotated with `@Inject`; only one such constructor should exist per class. | ||
| When a field or parameter is annotated with a name-providing annotation (i.e., an annotation annotated with `@org.apache.logging.log4j.plugins.name.NameProvider`), then the provided name or name of the field or parameter are included in the `Key<T>` for the injection point. | ||
| When a field or parameter is annotated with a name-providing annotation (i.e., an annotation annotated with `@org.apache.logging.log4j.plugins.NameProvider`), then the provided name or name of the field or parameter are included in the `Key<T>` for the injection point. |
There was a problem hiding this comment.
| When a field or parameter is annotated with a name-providing annotation (i.e., an annotation annotated with `@org.apache.logging.log4j.plugins.NameProvider`), then the provided name or name of the field or parameter are included in the `Key<T>` for the injection point. | |
| When a field or parameter is annotated with `@NameProvider`, then the provided name or name of the field or parameter are included in the `Key<T>` for the injection point. |
There was a problem hiding this comment.
as bundles which are instances or injectable
Class<T>instances that contain one or more annotated factory methods.
"Bundle" is a very convoluted term in the Java ecosystem. Above statement literally describes a "factory collection/set", which we can consider replacing bundle with as a more self-explanatory term.
There was a problem hiding this comment.
I called it "module" before as the concept is borrowed from Guice, but that gets confusing with Java modules. They're similar to spring @Configuration.
There was a problem hiding this comment.
I'll leave the decision to you. You can resolve this conversation as you wish.
This fixes #3870