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
ModifierConstructorDescriptionprotected
Constructor to be called by subclasses. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Object
create()
Creates a new instance of aTruffleInstrument
.protected Object
createInternalResource
(String resourceId) Creates an instrumentInternalResource
identified by theresourceId
.protected abstract String
Returns 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
Creates a new instance of aTruffleInstrument
.- Since:
- 23.1
-
getServicesClassNames
Returns the class names of provided services.- Since:
- 23.1
-
getInternalResourceIds
Returns ids of provided internal resources.- Since:
- 23.1
-
createInternalResource
Creates an instrumentInternalResource
identified by theresourceId
.- Throws:
IllegalArgumentException
- ifresourceId
is not supported by this instrument- Since:
- 23.1
-