Package org.yamcs.xtce.util
Class ResolvedParameterReference
- java.lang.Object
-
- org.yamcs.xtce.util.AbstractNameReference
-
- org.yamcs.xtce.util.ResolvedParameterReference
-
- All Implemented Interfaces:
NameReference,ParameterReference
public class ResolvedParameterReference extends AbstractNameReference implements ParameterReference
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
-
Nested classes/interfaces inherited from interface org.yamcs.xtce.util.ParameterReference
ParameterReference.ParameterResolvedAction
-
-
Field Summary
-
Fields inherited from class org.yamcs.xtce.util.AbstractNameReference
ref, type
-
-
Constructor Summary
Constructors Constructor Description ResolvedParameterReference(String ref, Parameter param)
-
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.ParameterReferenceaddResolvedAction(ParameterReference.ParameterResolvedAction action)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.booleantryResolve(Parameter param, PathElement[] path)-
Methods inherited from class org.yamcs.xtce.util.AbstractNameReference
getReference, getType, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.yamcs.xtce.util.NameReference
getReference, getType
-
-
-
-
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.- Specified by:
tryResolvein interfaceNameReference- 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.- Specified by:
addResolvedActionin interfaceNameReference- Returns:
- this
-
isResolved
public boolean isResolved()
- Specified by:
isResolvedin interfaceNameReference
-
getResolvedFuture
public CompletableFuture<NameDescription> getResolvedFuture()
Description copied from interface:NameReferencereturns a future that is called when the reference is resolved- Specified by:
getResolvedFuturein interfaceNameReference- Returns:
-
tryResolve
public boolean tryResolve(Parameter param, PathElement[] path)
- Specified by:
tryResolvein interfaceParameterReference
-
addResolvedAction
public ParameterReference addResolvedAction(ParameterReference.ParameterResolvedAction action)
- Specified by:
addResolvedActionin interfaceParameterReference
-
-