Class TruffleInstrumentProvider
java.lang.Object
com.oracle.truffle.api.instrumentation.provider.TruffleInstrumentProvider
Used to register a
TruffleInstrument using a ServiceLoader. This interface is not
intended to be implemented directly by an instrument developer, rather the implementation is
generated by the Truffle DSL. The generated implementation has to inherit the
TruffleInstrument.Registration annotations from the TruffleInstrument.- Since:
- 23.1
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor to be called by subclasses. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Objectcreate()Creates a new instance of aTruffleInstrument.protected ObjectcreateInternalResource(String resourceId) Creates an instrumentInternalResourceidentified by theresourceId.protected abstract StringReturns the name of a class implementing theTruffleInstrument.Returns ids of provided internal resources.protected abstract Collection<String> Returns the class names of provided services.
-
Constructor Details
-
TruffleInstrumentProvider
protected TruffleInstrumentProvider()Constructor to be called by subclasses.- Since:
- 23.1
-
-
Method Details
-
getInstrumentClassName
Returns the name of a class implementing theTruffleInstrument.- Since:
- 23.1
-
create
-
getServicesClassNames
Returns the class names of provided services.- Since:
- 23.1
-
getInternalResourceIds
-
createInternalResource
Creates an instrumentInternalResourceidentified by theresourceId.- Throws:
IllegalArgumentException- ifresourceIdis not supported by this instrument- Since:
- 23.1
-