Class ResourceRule<R extends ResourceRepresentative>
- java.lang.Object
-
- edu.kit.ipd.sdq.eventsim.instrumentation.description.core.SetBasedInstrumentationRule<R,R>
-
- edu.kit.ipd.sdq.eventsim.instrumentation.description.resource.ResourceRule<R>
-
- Type Parameters:
R
- the type of resources (eitherActiveResourceRep
orPassiveResourceRep
)
- All Implemented Interfaces:
InstrumentationRule
public class ResourceRule<R extends ResourceRepresentative> extends SetBasedInstrumentationRule<R,R>
AnInstrumentationRule
for resources.
-
-
Constructor Summary
Constructors Constructor Description ResourceRule()
ResourceRule(Class<R> resourceType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRestriction(InstrumentableRestriction<R> restriction)
boolean
affects(Instrumentable instrumentable)
Returns if anInstrumentable
would be probed if it comes to injection of the instrumentation.Class<R>
getInstrumentableType()
Class<R>
getProbedType()
ResourceSet<R>
getResourceSet()
List<InstrumentableRestriction<R>>
getRestrictions()
void
removeRestriction(InstrumentableRestriction<R> restriction)
void
setResourceSet(ResourceSet<R> resources)
-
Methods inherited from class edu.kit.ipd.sdq.eventsim.instrumentation.description.core.SetBasedInstrumentationRule
addCalculator, addProbe, getCalculators, getName, getProbes, removeCalculator, removeProbe, setCalculators, setName, setProbes
-
-
-
-
Method Detail
-
getResourceSet
public ResourceSet<R> getResourceSet()
-
setResourceSet
public void setResourceSet(ResourceSet<R> resources)
-
affects
public boolean affects(Instrumentable instrumentable)
Description copied from interface:InstrumentationRule
Returns if anInstrumentable
would be probed if it comes to injection of the instrumentation.- Parameters:
instrumentable
- anInstrumentable
to be checked- Returns:
true
, if the instrumentable will be probed orfalse
otherwise
-
getProbedType
public Class<R> getProbedType()
- Specified by:
getProbedType
in classSetBasedInstrumentationRule<R extends ResourceRepresentative,R extends ResourceRepresentative>
-
getInstrumentableType
public Class<R> getInstrumentableType()
- Specified by:
getInstrumentableType
in classSetBasedInstrumentationRule<R extends ResourceRepresentative,R extends ResourceRepresentative>
-
addRestriction
public void addRestriction(InstrumentableRestriction<R> restriction)
- Specified by:
addRestriction
in classSetBasedInstrumentationRule<R extends ResourceRepresentative,R extends ResourceRepresentative>
-
removeRestriction
public void removeRestriction(InstrumentableRestriction<R> restriction)
- Specified by:
removeRestriction
in classSetBasedInstrumentationRule<R extends ResourceRepresentative,R extends ResourceRepresentative>
-
getRestrictions
public List<InstrumentableRestriction<R>> getRestrictions()
- Specified by:
getRestrictions
in classSetBasedInstrumentationRule<R extends ResourceRepresentative,R extends ResourceRepresentative>
-
-