Package org.yamcs.xtce.util
Class ResolvedNameReference
- java.lang.Object
-
- org.yamcs.xtce.util.AbstractNameReference
-
- org.yamcs.xtce.util.ResolvedNameReference
-
- All Implemented Interfaces:
NameReference
public class ResolvedNameReference extends AbstractNameReference
Reference that is resolved since the beginning - it calls any action immediately.The reason for this class is that we do not want duplicate code paths in the SpreadSheet Loader (or other database loader)
- one path for the case when the named entities are found in the current space system
- one path for the case when they are not found and will be resolved later.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.yamcs.xtce.util.NameReference
NameReference.ResolvedAction, NameReference.Type
-
-
Field Summary
-
Fields inherited from class org.yamcs.xtce.util.AbstractNameReference
ref, type
-
-
Constructor Summary
Constructors Constructor Description ResolvedNameReference(String ref, NameReference.Type type, NameDescription nd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NameReferenceaddResolvedAction(NameReference.ResolvedAction action)Adds an action to the list to be executed when the reference is resolved and returns this.CompletableFuture<NameDescription>getResolvedFuture()returns a future that is called when the reference is resolvedbooleanisResolved()booleantryResolve(NameDescription nd)Execute all the actions (if not already executed) and return true if the reference has been resolved.-
Methods inherited from class org.yamcs.xtce.util.AbstractNameReference
getReference, getType, toString
-
-
-
-
Constructor Detail
-
ResolvedNameReference
public ResolvedNameReference(String ref, NameReference.Type type, NameDescription nd)
-
-
Method Detail
-
tryResolve
public boolean tryResolve(NameDescription nd)
Description copied from interface:NameReferenceExecute all the actions (if not already executed) and return true if the reference has been resolved.- Returns:
- true if the reference has been resolved
-
addResolvedAction
public NameReference addResolvedAction(NameReference.ResolvedAction action)
Description copied from interface:NameReferenceAdds an action to the list to be executed when the reference is resolved and returns this. If the reference is already resolved, execute the action immediately.- Returns:
- this
-
isResolved
public boolean isResolved()
-
getResolvedFuture
public CompletableFuture<NameDescription> getResolvedFuture()
Description copied from interface:NameReferencereturns a future that is called when the reference is resolved- Returns:
-
-