Skip to main content



      Home
Home » Modeling » TMF (Xtext) » annotationRef with String attribute as a static filed(annotationRef with String attribute as a static filed)
annotationRef with String attribute as a static filed [message #1799075] Thu, 29 November 2018 09:20 Go to next message
Eclipse UserFriend
Greetings,

I am generating code for an annotation on a class.

This form works for me

@Component(name = "ServiceX")
public class ServiceXImpl implements ServiceX {
...
}

Instead of the "ServiceX" string I would like to use a public static final String field defined on the ServiceX inteface

public interface ServiceX {
public static final String SERVICE_NAME = "ServiceX";
}

and

@Component(name = ServiceX.SERVICE_NAME)
public class ServiceXImpl implements ServiceX {
...
}

Is there a way to create a Jvm annotation for the latter option?

Thank you!
Oleg
Re: annotationRef with String attribute as a static filed [message #1799085 is a reply to message #1799075] Thu, 29 November 2018 10:55 Go to previous message
Eclipse UserFriend
no this currently no possible. feel free to file a enhancement request at github.com/eclipse/xtext-extras
Previous Topic:Saving Multiple Xtext Resources with Cyclic Cross References
Next Topic:Force incremental build
Goto Forum:
  


Current Time: Mon Jun 23 00:23:28 EDT 2025

Powered by FUDForum. Page generated in 0.04013 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top