AsmBackedClassGeneratorInjectDecoratedTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Move some classes around to bust up a package cycle.

    • -470
    • +0
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 60 more files in changeset.
Allow managed factories to be recreatable in worker processes

    • -9
    • +8
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 26 more files in changeset.
Move managed factories to a registry

    • -8
    • +9
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 48 more files in changeset.
Copy the caching strategy of `NamedObjectInstantiator` to `CrossBuildInMemoryCacheFactory` so that it can be reused, and use it to cache the details of generated classes.

    • -8
    • +9
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 15 more files in changeset.
Defer service lookups until they are required when creating a decorated object instance.

    • -23
    • +19
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 10 more files in changeset.
Remove some assumptions about which annotations are used for injecting services from the property inspection infrastructure, and instead have an injection scheme describe the annotations it supports to the property inspection scheme.

Also remove some caching from the factories of these schemes, as the schemes are all global services now.

    • -1
    • +1
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 17 more files in changeset.
Merge branch 'release'

    • -16
    • +37
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 5 more files in changeset.
Simplify resolving type parameters

Using Guava's TypeToken simplifies things and supports full

resolution.

    • -1
    • +35
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 2 more files in changeset.
A partial fix for class generation to handle service injection methods inherited from parameterized types and that use a type variable for their return type.

    • -16
    • +37
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 4 more files in changeset.
Add failing test for problems with generic type parameters

The return type of the property is not correct, since bound type

parameters of the superclass are not taken into account.

    • -0
    • +26
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
Add failing test for problems with generic type parameters

The return type of the property is not correct, since bound type

parameters of the superclass are not taken into account.

    • -0
    • +26
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
Add support for using the various `Property` types with a read-only abstract property on a generated type (in addition to the existing `ConfigurableFileCollection` support).

    • -10
    • +0
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 8 more files in changeset.
Use lenient instantiator for extensible instances

    • -0
    • +2
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 2 more files in changeset.
Change class generation to accept interface types. The interface may define mutable properties and an implementation is mixed in for each mutable property. The interface may also define `default` methods, `@Inject` properties and may extend `ExtensionAware`. Immutable properties with lazy types (eg `Property`) are not supported yet.

This commit does not include any validation or documentation. These will be added in later commits.

    • -1
    • +20
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 9 more files in changeset.
Add more validation of inject annotations.

- Don't allow an inject annotation on any method of a type for which it is not relevant, e.g. `@Workspace` on a `Task` (was only applied to getters previously).

- Don't allow multiple inject annotations on the same getter (received a cryptic error message previously).

- Don't allow inject annotations on private methods, setter methods, static methods and getter methods that cannot be overridden (was applied only to `@Inject` previously).

- Don't allow inject annotations on methods of `ExtensionAware` (received a cryptic error message previously).

    • -17
    • +105
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 7 more files in changeset.
Add a mechanism to register injection annotations globally and use this to validate that annotations are not attached to types where they are not supported. For example, fail when `@Workspace` is attached to a task property getter.

    • -0
    • +293
    ./AsmBackedClassGeneratorInjectDecoratedTest.groovy
  1. … 20 more files in changeset.