Class ReuseParameters
Parameters used in a model can be either marked as CREATE or REUSE. This information is
derived from the IInstantiationBehavior.
This class only handles parameters marked as REUSE: These will be parameters to the function representing the model itself. On all uses of a variable named REUSE the same Instance (optionally altered using Phi) will be used.
ReuseParameters collects all those parameters and builds the Descriptor of the later model.
Also ReuseParameters may be queried how to access these parameters the use of ParameterAccessor is the better way to get them.
- Since:
- 2013-11-02
- Author:
- Tobias Blaschke <code@tobiasblaschke.de>
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionReuseParameters(IInstantiationBehavior instanceBehavior, AndroidModel forModel) -
Method Summary
Modifier and TypeMethodDescriptionvoidcollectParameters(Iterable<? extends Entrypoint> entrypoints) Searches the given entrypoints for those parameters.booleanIs the parameter REUSE in a call from forModel to inCallTo.
-
Constructor Details
-
ReuseParameters
- Parameters:
instanceBehavior- The Behavior to query if the parameter is REUSEforModel- The AndroidModel in which context the status is to be determined
-
-
Method Details
-
collectParameters
Searches the given entrypoints for those parameters.A call to this function resets the internal knowledge of REUSE-Parameters. So in order to get a union of these parameters a union of the given entrypoints has to be built.
- Parameters:
entrypoints- The entrypoints to consider in the search.
-
isReuse
Is the parameter REUSE in a call from forModel to inCallTo.The 'forModel' was set in the constructor. Even so a parameter occurs in the descriptor it does not have to be REUSE for all calls.
The result of this method may vary over time :/
- Parameters:
param- The parameter in question of being reuseinCallTo- The callee to query the REUSEness for
-
toMethodReference
-