Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Commit

Permalink
Update Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
fmbenhassine committed Mar 13, 2020
1 parent 28e81fa commit 0c2efe9
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public PropertiesInjectorBuilder registerAnnotationProcessor(final Class<? exten
* Register a custom type converter.
*
* @param targetType the target field type
* @param converter to use
* @param converter to use
* @return this instance of @{link PropertiesInjectorBuilder}
*/
public PropertiesInjectorBuilder registerTypeConverter(Class<?> targetType, TypeConverter converter) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jeasy/props/annotations/Properties.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import java.lang.annotation.Target;

/**
* This annotation can be declared on a field of type {@link java.util.Properties} in which all properties of a given
* properties file should be injected.
* This annotation can be declared on a field of type {@link java.util.Properties}
* in which all properties from a given properties file should be injected.
*
* @author Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jeasy/props/api/AnnotationProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* Annotation processor interface.
* Implementations should provide the logic to get the value to inject in the target field annotated with T.
* Easy Properties will convert the value to the target field's type and set it in the field.
* Easy Props will convert the value to the target field's type and set it in the field.
*
* @param <T> The annotation type.
* @author Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
Expand All @@ -41,7 +41,7 @@ public interface AnnotationProcessor<T extends Annotation> {
*
* @param annotation the annotation to process.
* @param field the target field
* @return Return the object to set in the annotated field or null if the value should be ignored
* @return Return the object to set in the annotated field or {@code null} if the value should be ignored
* @throws AnnotationProcessingException thrown if an exception occurs during annotation processing
*/
Object processAnnotation(final T annotation, final Field field) throws AnnotationProcessingException;
Expand Down
28 changes: 28 additions & 0 deletions src/main/java/org/jeasy/props/converters/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* The MIT License
*
* Copyright (c) 2020, Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/**
* This package contains built-in type converters. As of v3.0.0, type conversion
* is based on Apache commons-beanutils.
*/
package org.jeasy.props.converters;
2 changes: 1 addition & 1 deletion src/main/java/org/jeasy/props/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
* THE SOFTWARE.
*/
/**
* This package contains core implementation of properties injection.
* This package contains the core implementation of properties injection.
*/
package org.jeasy.props;
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
import org.jeasy.props.annotations.EnvironmentVariable;
import org.jeasy.props.api.AnnotationProcessingException;

/**
* An annotation processor that loads properties from environment variables.
*
* @author Greg Schofield (gregs@indellient.com)
*/
public class EnvironmentVariableAnnotationProcessor extends AbstractAnnotationProcessor<EnvironmentVariable> {

private static final Logger LOGGER = Logger.getLogger(EnvironmentVariableAnnotationProcessor.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,14 @@
import static java.lang.String.format;

/**
* An annotation processor that loads a header value from META-INF/MANIFEST.MF file.
* An annotation processor that loads a header value from {@code META-INF/MANIFEST.MF} file.
*
* @author Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
*/
public class ManifestPropertyAnnotationProcessor extends AbstractAnnotationProcessor<ManifestProperty> {

private static final Logger LOGGER = Logger.getLogger(ManifestPropertyAnnotationProcessor.class.getName());

private static final String CLASSPATH = System.getProperty("java.class.path");

private static final String PATH_SEPARATOR = System.getProperty("path.separator");

/**
Expand Down

0 comments on commit 0c2efe9

Please sign in to comment.