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 NameReference
addResolvedAction(NameReference.ResolvedAction action)
Adds an action to the list to be executed when the reference is resolved and returns this.ParameterReference
addResolvedAction(ParameterReference.ParameterResolvedAction action)
CompletableFuture<NameDescription>
getResolvedFuture()
returns a future that is called when the reference is resolvedboolean
isResolved()
boolean
tryResolve(NameDescription nd)
Execute all the actions (if not already executed) and return true if the reference has been resolved.boolean
tryResolve(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:NameReference
Execute all the actions (if not already executed) and return true if the reference has been resolved.- Specified by:
tryResolve
in interfaceNameReference
- Returns:
- true if the reference has been resolved
-
addResolvedAction
public NameReference addResolvedAction(NameReference.ResolvedAction action)
Description copied from interface:NameReference
Adds 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:
addResolvedAction
in interfaceNameReference
- Returns:
- this
-
isResolved
public boolean isResolved()
- Specified by:
isResolved
in interfaceNameReference
-
getResolvedFuture
public CompletableFuture<NameDescription> getResolvedFuture()
Description copied from interface:NameReference
returns a future that is called when the reference is resolved- Specified by:
getResolvedFuture
in interfaceNameReference
- Returns:
-
tryResolve
public boolean tryResolve(Parameter param, PathElement[] path)
- Specified by:
tryResolve
in interfaceParameterReference
-
addResolvedAction
public ParameterReference addResolvedAction(ParameterReference.ParameterResolvedAction action)
- Specified by:
addResolvedAction
in interfaceParameterReference
-
-