Skip to content

Annotation fails when using array of constant strings #130

@kmader

Description

@kmader

I am using a fairly basic annotation structure

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
@Indexable
public static @interface BlockIdentity {
    String blockName();
    String desc() default "";
    String[] inputNames();
    String[] outputNames(); 
}

And the annotation creation fails when processing the array of strings with the error

[ERROR] error: java.io.IOException: Cannot handle object of type class com.sun.tools.javac.code.Attribute$Constant

when processing the inputNames array of this annotation

@BaseTIPLBlock.BlockIdentity(blockName = "GrowRegionsBlock",
            inputNames= {"labeled image", "mask image"}, 
            outputNames= {"filled labels", "filled neighborhood"})

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