Skip to content

package-info.java Support #16

Description

@mageddo

Need to support something like this:

package-info.java

@Reflection(
  scanPackage = "com.mageddo.dnsproxyserver.config.entrypoint",
  publicConstructors = true, constructors = true, declaredConstructors = true,
  publicMethods = true, declaredMethods = true,
  publicFields = true, declaredFields = true
)
package com.mageddo.dnsproxyserver.config.entrypoint;

import nativeimage.Reflection;

Actually you will get this error

warning: Supported source version 'RELEASE_7' from annotation processor 'org.gradle.api.internal.tasks.compile.processing.TimeTrackingProcessor' less than -source '17'
error: fatal: element type must be class but is PACKAGE
  java.lang.IllegalArgumentException: element type must be class but is PACKAGE
        at org.apache.commons.lang3.Validate.isTrue(Validate.java:158)
        at com.mageddo.aptools.elements.ElementUtils.validateTypeElement(ElementUtils.java:35)
        at com.mageddo.aptools.elements.ElementUtils.toClassName(ElementUtils.java:23)
        at nativeimage.core.NativeImageReflectionConfigGenerator.addElement(NativeImageReflectionConfigGenerator.java:141)
        at nativeimage.core.NativeImageReflectionConfigGenerator.addToElementAndNested(NativeImageReflectionConfigGenerator.java:126)
        at nativeimage.core.NativeImageReflectionConfigGenerator.addMatchingProjectSourceElements(NativeImageReflectionConfigGenerator.java:95)
        at nativeimage.core.NativeImageReflectionConfigGenerator.processElementsForAnnotation(NativeImageReflectionConfigGenerator.java:82)
        at nativeimage.core.NativeImageReflectionConfigGenerator.processElementsForAnnotation(NativeImageReflectionConfigGenerator.java:72)
        at nativeimage.core.NativeImageReflectionConfigGenerator.process(NativeImageReflectionConfigGenerator.java:50)
        at nativeimage.processor.AnnotationProcessor.process(AnnotationProcessor.java:41)
        at org.gradle.api.internal.tasks.compile.processing.DelegatingProcessor.process(DelegatingProcessor.java:62)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions