Skip to content

Commit

Permalink
Add static accessor method for MessagerUtils.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasstamann committed Jul 12, 2017
1 parent 2a4cdbb commit 219ccf4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import de.holisticon.annotationprocessortoolkit.internal.FrameworkToolWrapper;

import javax.annotation.processing.Messager;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
import javax.lang.model.element.Element;
Expand Down Expand Up @@ -100,6 +101,10 @@ public static MessagerUtils getMessagerUtils(FrameworkToolWrapper frameworkToolW
return new MessagerUtils(frameworkToolWrapper.getMessager());
}

public static MessagerUtils getMessagerUtils(ProcessingEnvironment processingEnvironment) {
return getMessagerUtils(new FrameworkToolWrapper(processingEnvironment));
}

/**
* Creates a message by using a custom templating mechanism.
* Argument placeholder with the following format '${index}'
Expand Down

0 comments on commit 219ccf4

Please sign in to comment.