public abstract static class SnippetTemplate.AbstractTemplates extends Object implements SnippetTemplateCache
SnippetTemplate
s.Modifier and Type | Field and Description |
---|---|
protected Providers |
providers |
protected SnippetReflectionProvider |
snippetReflection |
protected TargetDescription |
target |
private ConcurrentHashMap<SnippetTemplate.CacheKey,SnippetTemplate> |
templates |
(package private) static boolean |
UseSnippetTemplateCache |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTemplates(Providers providers,
SnippetReflectionProvider snippetReflection,
TargetDescription target) |
Modifier and Type | Method and Description |
---|---|
static Method |
findMethod(Class<? extends Snippets> declaringClass,
String methodName,
Method except) |
protected SnippetTemplate.SnippetInfo |
snippet(Class<? extends Snippets> declaringClass,
String methodName,
LocationIdentity... privateLocations)
Finds the unique method in
declaringClass named methodName annotated by
Snippet and returns a SnippetTemplate.SnippetInfo value describing it. |
protected SnippetTemplate |
template(SnippetTemplate.Arguments args)
Gets a template for a given key, creating it first if necessary.
|
static final boolean UseSnippetTemplateCache
protected final SnippetReflectionProvider snippetReflection
protected final TargetDescription target
private final ConcurrentHashMap<SnippetTemplate.CacheKey,SnippetTemplate> templates
protected AbstractTemplates(Providers providers, SnippetReflectionProvider snippetReflection, TargetDescription target)
public static Method findMethod(Class<? extends Snippets> declaringClass, String methodName, Method except)
protected SnippetTemplate.SnippetInfo snippet(Class<? extends Snippets> declaringClass, String methodName, LocationIdentity... privateLocations)
declaringClass
named methodName
annotated by
Snippet
and returns a SnippetTemplate.SnippetInfo
value describing it. There must be
exactly one snippet method in declaringClass
.protected SnippetTemplate template(SnippetTemplate.Arguments args)