Top Description Inners Methods
com.oracle.svm.core.annotate

public @Interface TargetClass

extends Annotation
Annotations
@Retention:RUNTIME
@Target:TYPE
@Platforms:HOSTED_ONLY
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target, java.util.function.BooleanSupplier, .Function, .Predicate, org.graalvm.nativeimage.Platform, .Platforms

A class annotated with this annotation denotes a class that modifies methods of fields of another class, called the "original" class. The original class is specified using annotation parameters: value or className specify the original class either as a class literal or by name, while classNameProvider is the most flexible approach where the class name is computed by user code. Optionally, inner classes can be specified using the innerClass property. Based on additional annotations, the original class is modified in different ways:
Since
22.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
TargetClass.AlwaysIncluded

The default value for the TargetClass#onlyWith() attribute.

public static interface
TargetClass.NoClassNameProvider

Marker value for classNameProvider that no class name provider should be used.

Method Summary

Modifier and TypeMethod and Description
public String
className()

Specifies the substitutee class using a class-name string.

public Class<? extends Function<TargetClass, String>>
classNameProvider()

Specifies the substitutee class.

public String[]
innerClass()

Specifies the suffix of the substitutee class name when it is an inner class.

public Class<?>[]
onlyWith()

Substitute only if all provided predicates are true (default: unconditional substitution that is always included).

public Class<?>
value()

Specifies the substitutee class using a class literal.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

classNameback to summary
public String className()

Specifies the substitutee class using a class-name string. This method is provided for cases where the substitutee class is not accessible (according to Java language access control rules). Either value(), className() or classNameProvider() element can be used to specify the substitutee class.

Since
22.3
classNameProviderback to summary
public Class<? extends Function<TargetClass, String>> classNameProvider()

Specifies the substitutee class. This is the most flexible version to provide the class name to specify which class should be substituted. The Function#apply method of the provided class can compute the class name based on system properties (like the JDK version). This annotation is the argument of the function, so the function can, e.g., build a class name that incorporates the className() property. Either value(), className() or classNameProvider() element can be used to specify the substitutee class.

Since
22.3
innerClassback to summary
public String[] innerClass()

Specifies the suffix of the substitutee class name when it is an inner class.

Since
22.3
onlyWithback to summary
public Class<?>[] onlyWith()

Substitute only if all provided predicates are true (default: unconditional substitution that is always included). The classes must either implement BooleanSupplier or Predicate<String> (the parameter for Predicate#test is the "original" class name as a String).

Since
22.3
valueback to summary
public Class<?> value()

Specifies the substitutee class using a class literal. Either value(), className() or classNameProvider() element can be used to specify the substitutee class.

Since
22.3
com.oracle.svm.core.annotate back to summary

public Class TargetClass.AlwaysIncluded

extends Object
implements BooleanSupplier
Class Inheritance
All Implemented Interfaces
java.util.function.BooleanSupplier

The default value for the TargetClass#onlyWith() attribute.
Since
22.3

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AlwaysIncludedback to summary
pack-priv AlwaysIncluded()

Method Detail

getAsBooleanback to summary
public boolean getAsBoolean()

Implements java.util.function.BooleanSupplier.getAsBoolean.

Doc from java.util.function.BooleanSupplier.getAsBoolean.

Gets a result.

Returns:boolean

a result

Annotations
@Override
Since
22.3
com.oracle.svm.core.annotate back to summary

public Interface TargetClass.NoClassNameProvider

extends Function<TargetClass, String>

Marker value for classNameProvider that no class name provider should be used.
Since
22.3

Method Summary

Inherited from java.util.function.Function:
andThenapplycomposeidentity