简体   繁体   中英

error: 'attribute value must be constant' for attribute's value = Class

I have some class, where I need have a annotation with parameter's type 'Class':

@ClassEntry(InformationPage)
public class LossInformation {...}

where InformationPage - name of class.

When I use the above line of code, I get a 'attribute value must be constant' error. Why? What should I do to fix this error?

试试@ClassEntry(InformationPage.class)而不是 InformationPage

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM