public static interface SourceCodeAnalysis.SnippetWrapper
This interface, in addition to the mapped form, provides the context and position mapping information.
Modifier and Type | Method and Description |
---|---|
String |
fullClassName()
Returns the fully qualified class name of the
wrapped() class. |
Snippet.Kind |
kind()
Returns the
Snippet.Kind of the
source() . |
String |
source()
Returns the input that is wrapped.
|
int |
sourceToWrappedPosition(int pos)
Maps character position within the source to character position
within the wrapped.
|
String |
wrapped()
Returns a Java class definition that wraps the
source() or, if an import, the import source. |
int |
wrappedToSourcePosition(int pos)
Maps character position within the wrapped to character position
within the source.
|
String source()
wrappers(String)
,
this is the source of the snippet within the input. A variable
declaration of N
variables will map to N
wrappers
with the source separated.
For wrapper(Snippet)
,
this is Snippet.source()
.
String wrapped()
source()
or, if an import, the import source.
If the input is not a valid Snippet, this will not be a valid class/import definition.
The source may be divided and mapped to different locations within the wrapped source.
String fullClassName()
wrapped()
class.
For erroneous input, a best guess is returned.Snippet.Kind kind()
Snippet.Kind
of the
source()
.int sourceToWrappedPosition(int pos)
Copyright © 2015, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-08-10-220919.robert.dev