|
org.netbeans.modules.parsing.api/1 1.55.0 6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.parsing.api.Embedding
public final class Embedding
Represents one block of code embedded in some other source. Performance is the only purpose of this class. You can obtain some basic information about embedded block of code before it is really created. Following example shows how to create compound Embedding from some snapshot:
Embedding compoundEmbedding = Embedding.create (Arrays.asList (new Source[] {
snapshot.create ("some prefix code", "text/x-java"),
snapshot.create (10, 100, "text/x-java"),
snapshot.create ("some postfix code", "text/x-java")
})));
| Method Summary | |
|---|---|
boolean |
containsOriginalOffset(int originalOffset)
Returns true if this embedding contains given offset related
to top level source. |
static Embedding |
create(List<Embedding> embeddings)
Creates Embedding from a list of embeddings. |
String |
getMimeType()
Returns mime type of embedded source. |
Snapshot |
getSnapshot()
Returns Snapshot for embedded block of code. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Embedding create(List<Embedding> embeddings)
Embedding from a list of embeddings. All embeddings
have to be created from one Smapshot. All embeddings must have the same
mime type, but this mime type have to be different than current
embedding mime types.
embeddings - A list of some embeddings created from one source.
IllegalArgumentException - if embeddings collection is empty, or
mime types of embeddings are not same.
NullPointerException - embedding is null.public final Snapshot getSnapshot()
Snapshot for embedded block of code.
Snapshot for embedded block of code..public final String getMimeType()
public final boolean containsOriginalOffset(int originalOffset)
true if this embedding contains given offset related
to top level source.
originalOffset - A offset in original source.
true if this embedding contains given offsetpublic String toString()
toString in class Object
|
org.netbeans.modules.parsing.api/1 1.55.0 6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||