Package dev.cel.common
Class CelContainer
- java.lang.Object
-
- dev.cel.common.CelContainer
-
@Immutable public abstract class CelContainer extends java.lang.ObjectCelContainer holds a reference to an optional qualified container name and set of aliases.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCelContainer.BuilderBuilder forCelContainer
-
Constructor Summary
Constructors Constructor Description CelContainer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableList<java.lang.String>abbreviations()com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String>aliases()Returns the aliases configured in the container.abstract java.lang.Stringname()static CelContainer.BuildernewBuilder()static CelContainerofName(java.lang.String containerName)com.google.common.collect.ImmutableSet<java.lang.String>resolveCandidateNames(java.lang.String typeName)Returns the candidates name of namespaced identifiers in C++ resolution order.CelContainer.BuildertoBuilder()
-
-
-
Method Detail
-
name
public abstract java.lang.String name()
-
aliases
public com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> aliases()
Returns the aliases configured in the container.The key of the map is the alias and the value is the corresponding fully qualified name.
-
abbreviations
public com.google.common.collect.ImmutableList<java.lang.String> abbreviations()
-
resolveCandidateNames
public com.google.common.collect.ImmutableSet<java.lang.String> resolveCandidateNames(java.lang.String typeName)
Returns the candidates name of namespaced identifiers in C++ resolution order.Names which shadow other names are returned first. If a name includes a leading dot ('.'), the name is treated as an absolute identifier which cannot be shadowed.
Given a container name a.b.c.M.N and a type name R.s, this will deliver in order:
- a.b.c.M.N.R.s
- a.b.c.M.R.s
- a.b.c.R.s
- a.b.R.s
- a.R.s
- R.s
If aliases or abbreviations are configured for the container, then alias names will take precedence over containerized names.
-
toBuilder
public CelContainer.Builder toBuilder()
-
newBuilder
public static CelContainer.Builder newBuilder()
-
ofName
public static CelContainer ofName(java.lang.String containerName)
-
-