Package io.micronaut.sourcegen.bytecode.tck
package io.micronaut.sourcegen.bytecode.tck
The behaviour every bytecode backend must provide.
- Since:
- 2.2
-
ClassDescriptionThe support shared by every topic of the bytecode writer TCK: writing definitions with the backend under test, loading them, and calling them next to javac's own call of a compiled fixture.Compiled fixtures, shared by several TCK topics, for the applicability of generic overloads: wildcard, recursive and dependent bounds, and generic variable arity calls.ApplicabilityFixtures.NumericIdentity<T extends Number>Generic inherited implementation.Compiled overload oracle.Compiled fixtures for a generic class that declares the bound of its type parameter.The overloads the generated calls choose between, called from javac to tell the expected result.BoundedBoxFixtures.NumberBox<E extends Number>A generic class that declares the bound of its parameter.Bridge methods: which bridges a generated class needs, their flags and descriptors, and the dispatch through them, compared with the bridges javac writes.A contract requiring a multidimensional generic array bridge.javac's covariant clone.javac's bridge of a default method.javac's covariant clone below an explicit superclass.javac's bridge of a final synchronized method.A generic contract whose method declares a separate bounded variable.A generic superclass used raw by a generated subclass.A generic method of a generic class.A second generic getter.javac's narrowing override.javac verifies the inherited generic method implements the contract.A contract whose generic method erases to Object.BridgeTck.MethodBoundParent<T extends Number>A method bound depends on the class variable.A plain covariant return.A covariant source.A generic contract whose method declares a checked exception.A superclass declaring nothing.javac emits a public accept(Object) bridge despite the private superclass method.Private erased overload cannot satisfy an inherited public interface contract.javac's protected bridge.A protected generic method.javac's one bridge for two interfaces.Another erased return contract.javac's override in a parameterized subclass.An inherited implementation that predates a subclass implementing Supplier.javac's two bridges.javac's visibility bridge.The behaviour every bytecode backend must provide, asserted through the classes a backend writes rather than through the bytecode it emits, so that the same tests hold for any backend.Compiled fixtures, shared by several TCK topics, whose overloads javac chooses by capturing wildcards and solving bounds; a generated call must choose the same overload.Second intersection bound.javac overload oracle.Common interfaces deliberately declared in the opposite order to the method bounds.Other common-interface implementation.First intersection bound.Loops, switches, try, catch and finally, and the statements that complete them, compared with what javac writes for the same source.Conversions: casts, boxing and unboxing, primitive widening of arguments and of requested return types, and values discarded after they are converted.Compiled fixtures, shared by several TCK topics, whose member types and overloads depend on the type arguments of an enclosing type.Independent overload and varargs oracles.EnclosingTypeFixtures.NumericParent<T extends Number>Inherited generic parameter overloads.EnclosingTypeFixtures.Outer<T extends Number>Enclosing class for member scope tests.Operators and array expressions: numeric promotion of arithmetic and shifts, structural and referential equality, and array creation and access, compared with what javac writes for the same source.Loads classes a backend wrote, by binary name, so that they can refer to each other and to the classes of the tests that wrote them.An if/else statement whose then branch completes normally continues after the whole statement, not into the else branch.Compiled fixtures, shared by several TCK topics, for inference constraints: wildcard containment, lower bounds, least upper bounds and generic variable arity calls.javac overload oracle.First unrelated implementation.InferenceFixtures.RawBoundedReceiver<T extends Number>Raw bounded class oracle.Common interface for unrelated classes.Inference of method type arguments: wildcard capture and containment, bound checks, least upper bounds, generic variable arity calls and the requested return type.Implements the markers in declaration order.Implements the markers in declaration order.A common varargs superclass.Varargs whose component belongs to the class.Constructor overload oracle.InferenceTck.ConsumerBox<T extends Number>Capture conversion oracle.A varargs input.Generic receiver whose erased result differs from its parameterized result.InferenceTck.GenericMethodReceiver<T extends CharSequence>Generic receiver with a method variable bounded by its class variable.Generic variable arity inference.Marker of a higher rank.InferenceTck.Receiver<T extends CharSequence>Wildcard receiver oracle.InferenceTck.ReceiverMethodVarargs<T extends Number>A varargs method whose variable is bounded by its generic receiver.Second unrelated implementation.Another varargs input.Inherited specialization of class varargs.Marker.Constructor inference oracle.A class with a distinct Comparable argument.Implements the markers in declaration order.Lambdas and method references: the functional interface method they implement, the receiver they capture and the scope of the type variables they use.A superclass with a method to refer to through `super`.Generic superclass for a void-adapted reference.Member types: references to a member type by its binary name, enclosing type arguments of inner classes, and the signatures and overloads of their members.Runtime type annotation used as an independent path oracle.javac member-type signature oracle.javac bridge oracle.Enclosing generic type for member signatures.Member signatures compiled independently by javac.MemberTypeTck.TypedMembers<T extends Number, U extends T>Combined owner, class, method, exception and array signatures compiled by javac.Compiled fixtures: javac's
==and!=of two primitives, which promotes both operands to a common type (binary numeric promotion) - alongcompared with afloatis compared as afloat.Compiled fixtures, shared by several TCK topics, for overload selection by primitive widening, boxing, variable arity and least upper bounds, and for calls on interface and intersection receivers.Marker.Overloads the calls choose between.javac's enum bridge.An overload the argument does not apply to.OverloadFixtures.NumberBox<E extends Number>A class whose variable is bounded.An overload of one bound.javac's calls on receivers.A more specific overload of another bound.The overload the argument applies to.Marker.Implements the markers in declaration order.Overload selection: the phases of strict, loose and variable arity invocation, the most specific method, accessibility of candidates and explicit descriptors.Constructors with different access levels.Public alternatives to inaccessible overloads.A fixed arity array declaration.Array covariance control.Class satisfying both intersection bounds.Implements both intersection bounds.Both bounds.Implements both return descriptors.Both bounds.Reflected generic overloads.Inherited covariant declarations.Implementation used by the independent oracle.First overloaded intersection bound.Generic class with a class-variable overload and an Object fallback.Covariant receiver bound.Narrow covariant declaration.Covariant receiver bound.An overload of a superclass.Reflected overloads with observably different results.A public and a package-private overload.A public and a protected overload.The javac-compiled subclass calling the overloads.Overloads whose specificity changes when the receiver is parameterized.Second overloaded intersection bound.Receiver specialized through inheritance.Generic receiver with a concrete overload.An overload of an interface.Both.Varargs overload controls.Wide covariant declaration.A public and a protected overload taking a supertype of the argument.The javac-compiled subclass calling the overloads through a receiver of its own type.Calls through a receiver: type variable, raw, parameterized, intersection and interface receivers, and the class scope in which a callee's type variables and inherited members are resolved.javac's class of both.Constructor overload oracle.Overloads inherited by a generated class.javac's calls on this and super.Instance overload oracle.A default method.Raw inheritance oracle.A generated interface stand-in.ReceiverTck.MethodBounds<X extends Number>A method bound refers to the receiver's type argument.A raw use erases this type's entire superclass.Own method variables of a raw class.Raw receivers erase instance member types.Inherited generic overloads.ReceiverTck.ReceiverBound<T extends CharSequence>Method bound depends on the receiver.A default method of the same name.A method variable shadows a receiver variable.A superclass declaring a static method, called throughsuper.A specialized receiver.Compiled fixtures, shared by several TCK topics, for overload resolution that depends on the bounds of the caller's type variables and on upper-only inference constraints.Independent inference and overload oracles.Intersection markers for specificity.Type-variable bound with overloads.Second intersection marker.Compiled fixtures shared by the signature TCK and the TCK topics that reuse its annotations and bridges.Bridge for a substituted inherited implementation.Runtime marker for generic bound type annotations.Erasure and generic signatures: descriptors, Signature attributes, type annotations and member flags of generated classes, compared with the classes javac writes from the same declarations.SignatureTck.AnnotatedClassBound<T extends Number>Annotation on a class variable's bound.SignatureTck.AnnotatedDependentBound<T extends U, U extends Number>Annotated type-variable bound occupies the class-bound slot.SignatureTck.AnnotatedGenericArrays<T extends Number>Annotations at multiple array levels.Annotated interface bounds keep their distinct bound indexes.Annotation on a method variable's bound.An annotated generic exception without other generic uses.Nested type argument in a bound.Explicit annotated Object intersection bounds remain class bounds.Explicit Object wildcard bounds retain their type annotations.Annotated generic superclass.Annotated generic superinterface.Annotated generic and concrete throws.Annotations on class and method variable uses.Annotations on both wildcard directions.Array rank distinguishes generic overloads.SignatureTck.BoundedRecord<T extends Number, U extends T>Record with dependent bounded components.SignatureTck.ClassBound<T extends Number>Name-only bounded class references and arrays.SignatureTck.CrossScope<T extends Number>Method bounds reference class variables.Wrong erasure must not collapse two legal overloads into one descriptor.SignatureTck.ForwardBounds<A extends B, B extends Number>A bound can refer to a later declaration.Generic array bridge parameters.Generic scalar bridge parameters.A covariant generic method with a method exception variable.Generic constructors have method-scoped bounds.An interface with dependent variables and generic exceptions.SignatureTck.GenericOverloads<T extends CharSequence>Different bounds distinguish class-variable and method-variable overloads.Method-scoped generic exception.SignatureTck.Inheritance<T extends Number>Parameterized superclass and superinterface signatures.Generic throwing contract for inherited method-scoped exception checks.Inherited method-scoped checked exception.A bridge inherited from a method declaring its own exception variable.Generic throwing contract for inherited bridge checks.Inherited concrete implementation with a checked exception.An inherited bridge retains checked exception metadata.Interface-only intersection bounds.SignatureTck.InterfaceMethodShadow<A extends B, B extends Number>An interface method can shadow a class bound's name.Intersection with a class as its first bound.SignatureTck.LongClassChain<A extends B, B extends C, C extends D, D extends E, E extends F, F extends G, G extends H, H extends I, I extends J, J extends K, K extends L, L extends Number>Long class bound chains.Long method bound chains.Method variables belong to the inherited method.Bounded method references.Scalar method variables belong to the inherited method.SignatureTck.MethodBoundToClass<A extends Number>A method variable may use a class variable as its bound.Method variables reference other method variables.Intersection bounds of a generic method.Ordinary and generic exceptions coexist in a method signature.Mutually recursive bounds terminate at parameterized erasure.SignatureTck.NestedRecord<T extends Comparable<? super T>>Record with recursive bounds and nested arrays.SignatureTck.NestedWildcards<T extends Number>Deeply nested wildcards and arrays.Bridge descriptors retain the explicit Object bound.Explicit Object remains the leftmost erasure.An explicit Object bound determines erasure.Plain signature fixture.SignatureTck.Recursive<T extends Comparable<? super T>>A recursively bounded variable with a lower wildcard.Recursive method bounds erase to their raw interface.Self references and covariant bridge metadata.SignatureTck.Shadowed<T extends CharSequence>Method variables shadow their class namesakes.SignatureTck.ShadowedClassBoundChain<A extends B, B extends Number>Class bounds retain their declaration scope when a method shadows a bound's name.SignatureTck.ShadowedExceptionBound<E extends Exception, T extends E>Exception erasure retains the class declaration scope.Combines dependent class bounds, nested wildcard arrays, method bounds and a generic exception.A covariant redeclaration requires a concrete bridge.A bridge has an erased signature and no method variables.javac's synchronized method.Contract whose bridge must retain the erased method exception.SignatureTck.ThrowsOnly<E extends Exception>Class-scoped generic exception used only in throws.Unbounded class and method variables.A constructor variable need not appear in its parameters.A method variable need not appear in its parameters or result.javac's volatile and transient fields, public for reflection to read them.Nested wildcards, member types and generic arrays.