[
https://issues.jboss.org/browse/ROASTER-124?page=com.atlassian.jira.plugi...
]
George Gastaldi commented on ROASTER-124:
-----------------------------------------
You need to break into their respective calls instead:
{code:java}
AnnotationSource<?> ann = method.addAnnotation(annotationStructure.getName());
ann.setClassValue("clazz",ComprehensionTool.class);
ann.setStringValue("method","startAnalyse");
{code}
AnnotationSource.setLiteralValue() error occur
----------------------------------------------
Key: ROASTER-124
URL:
https://issues.jboss.org/browse/ROASTER-124
Project: Roaster
Issue Type: Bug
Components: API
Affects Versions: 2.19.4.Final
Environment: intelliJ IDEA, MacOS - Sierra
Reporter: Ondrej Zoricak
Priority: Critical
Error:
{code:java}
Exception in thread "main" java.lang.ClassCastException:
org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.NormalAnnotation cannot be cast to
org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.SingleMemberAnnotation
at
org.jboss.forge.roaster.model.impl.AnnotationImpl.setLiteralValue(AnnotationImpl.java:325)
at
comprehensionTool.data.annotation.AnnotationImplementer.annotateMethod(AnnotationImplementer.java:132)
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)