Skip to content

Commit ac5402e

Browse files
author
JimLaskey
committed
Requested changes #5
1 parent 39c63c0 commit ac5402e

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

Diff for: src/java.base/share/classes/java/lang/runtime/TemplateRuntime.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@
3333
import java.lang.template.ProcessorLinkage;
3434
import java.lang.template.StringTemplate;
3535
import java.lang.template.ValidatingProcessor;
36-
import java.util.*;
36+
import java.util.ArrayList;
37+
import java.util.Arrays;
38+
import java.util.Collections;
39+
import java.util.List;
40+
import java.util.Objects;
3741

3842
import jdk.internal.access.JavaTemplateAccess;
3943
import jdk.internal.access.SharedSecrets;

Diff for: src/java.base/share/classes/java/lang/template/ProcessorLinkage.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@
4747
@PreviewFeature(feature=PreviewFeature.Feature.STRING_TEMPLATES)
4848
public sealed interface ProcessorLinkage permits FormatProcessor {
4949
/**
50-
* Construct a {@link MethodHandle} that constructs a result based on the
51-
* bootstrap method information.
50+
* This method creates a {@link MethodHandle} that when invoked with arguments of
51+
* those specified in {@code type} returns a result that equals that returned by
52+
* the template processor's process method. The difference being that this method
53+
* can preview the template's fragments and value types in advance of usage and
54+
* thereby has the opportunity to produce a specialized implementation.
5255
*
5356
* @param fragments string template fragments
5457
* @param type method type

Diff for: src/java.base/share/classes/java/lang/template/TemplateProcessor.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@
4747
*/
4848
@PreviewFeature(feature=PreviewFeature.Feature.STRING_TEMPLATES)
4949
@FunctionalInterface
50-
public interface TemplateProcessor<R> extends ValidatingProcessor<R, RuntimeException> {}
50+
public interface TemplateProcessor<R> extends ValidatingProcessor<R, RuntimeException> {
51+
52+
}

0 commit comments

Comments
 (0)