Package manifold.ext.rt.api
Annotation Type Self
-
@Retention(RUNTIME) @Target({TYPE_USE,METHOD}) public @interface Self
Annotate a method return type, parameter type, or a field type with @Selfto achieve Self type behavior. Note theElementType.METHODtarget is for internal use only. This is necessary for generated code where even though the code applies theSelfannotation at the method return type position Java 8 misinterprets it as a Method annotation, hence the METHOD target here. The METHOD target type will be removed in a future release. See the Self Type documentation for more information.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanvaluevalueis exclusive to array extension methods.
-
-
-
Element Detail
-
value
boolean value
valueis exclusive to array extension methods. Setting totrueaccesses the array's core component type instead of the array type itself. E.g.,public class MyArrayExtension { public static List<@Self(true) Object> toList(@This Object array) { return Arrays.asList((Object[])array); }- Default:
- false
-
-