public class EnvironmentImpl extends java.lang.Object implements Environment
Environment
.Modifier and Type | Field and Description |
---|---|
protected @NotNull java.util.Map<Document,Compilation> |
compilations
The compilations in this environment.
|
protected @Nullable @UnmodifiableView java.util.Set<Compilation> |
compilationSet
A set of the compilations in this environment.
|
protected @NotNull Diagnostic |
diagnostic
The diagnostic manager in this enlivenment.
|
protected @NotNull java.util.Map<java.lang.String,java.lang.Object> |
meta
The additional meta-data of this sketch.
|
Constructor and Description |
---|
EnvironmentImpl() |
Modifier and Type | Method and Description |
---|---|
@NotNull java.util.Set<Compilation> |
compilationSet()
Return a set view containing the compilations in this environment.
|
@Nullable Compilation |
getCompilation(@NotNull Document document)
Get the compilation set to this environment with the given
document or
return null if no such compilation exist in this environment. |
@Nullable Compilation |
getCompilation(@NotNull java.lang.String name)
Get the compilation registered in this environment with the document qualified with
the given
name or return null if no such compilation has been set
in this environment. |
@NotNull Diagnostic |
getDiagnostic()
Return the diagnostic manager in this environment.
|
@NotNull java.util.Map<java.lang.String,java.lang.Object> |
getMeta()
Returns the meta-data map of this environment.
|
@NotNull Compilation |
optCompilation(@NotNull Document document)
Return the compilation set to this environment with the given
document or
create a new compilation for the given document , add it to this environment
and return it. |
void |
setCompilation(@NotNull Document document,
@NotNull Compilation compilation)
Associate the given
compilation to the given document in this
environment. |
@NotNull protected final @NotNull java.util.Map<Document,Compilation> compilations
@NotNull protected final @NotNull Diagnostic diagnostic
@NotNull protected final @NotNull java.util.Map<java.lang.String,java.lang.Object> meta
@Nullable protected @Nullable @UnmodifiableView java.util.Set<Compilation> compilationSet
@NotNull public @NotNull java.util.Set<Compilation> compilationSet()
Environment
compilationSet
in interface Environment
@Nullable public @Nullable Compilation getCompilation(@NotNull @NotNull Document document)
Environment
document
or
return null
if no such compilation exist in this environment.getCompilation
in interface Environment
document
- the document of the compilation to be returned.document
in this environment. Or
null
if no such compilation exist.@Nullable public @Nullable Compilation getCompilation(@NotNull @NotNull java.lang.String name)
Environment
name
or return null
if no such compilation has been set
in this environment.getCompilation
in interface Environment
name
- the qualification name of the document of the compilation to be
returned.name
set to this environment. Or
null
if no such compilation exist.@NotNull public @NotNull Diagnostic getDiagnostic()
Environment
getDiagnostic
in interface Environment
@NotNull public @NotNull java.util.Map<java.lang.String,java.lang.Object> getMeta()
Environment
getMeta
in interface Environment
@NotNull public @NotNull Compilation optCompilation(@NotNull @NotNull Document document)
Environment
document
or
create a new compilation for the given document
, add it to this environment
and return it.optCompilation
in interface Environment
document
- the document to get a compilation for.document
in this environment or a
newly created, then added compilation for the given document
.public void setCompilation(@NotNull @NotNull Document document, @NotNull @NotNull Compilation compilation)
Environment
compilation
to the given document
in this
environment.setCompilation
in interface Environment
document
- the document to be associated to the given compilation
.compilation
- the compilation.