Java-Type for Concepts Follow
Hi,
is there a JAVA-Type for my Concepts which i can use from within Java-classes (f.e. Utilities for Code-Generation)? The use-case for me is to derive Class-Names for some Concept. I don't want to duplicate that code for f.e. the Class-Generation and the usage elsewhere (maybe in config-files).
Thx,
Mirko
Please sign in to leave a comment.
Hello, Mirko.
I didn't understand your question. Could you try to reformulate it?
If you want to extract a reusable part somewhere, the best place for it is the behavior aspect. Just click on the behavior tab of your concept and create a new behavior root. You will be able to define methods there which you can call with dot expression,
Regards,
Konstantin
Hi Konstantin,
so ok, maybe i try to solve the problem the wrong way ;-)
I have a concept wich will be source for generating a JAVA-Class (1:1). This concept has several Properties. At the moment i'm deriving the name for the class to be generated from the property *name*. I'm using that class-name at several different places in the code that is being generated (f.e. the class-name itself, other classes that reference this class). As the way the name is generated may change in the future i want to have the decision/code "how to generate the name" in one single place. I chose to call some Utility-Class (static call) written in JAVA. At the moment i can't (don't know how to) give the Concept itself as a Parameter to that call, so i give several properties as parameters. But this is not satisfactory to me, because, as i laready mentioned, the way it is calculated may change in the future (maybe dependent to some child-ref or so).
So my idea was to use the ability to call static Java-Methods. As i read your hint with the behavior ... maybe not the best idea ;-).
Can you give me a recommendation how you would solve that demand?
thx,
Mirko
Mirko,
Why you don't want to put such a method to the concept's behavior? I would do so.
Konstantin
Hi Konstantin,
sounds good to me. The static-Util-Solution was more a quick-shot on that problem.
Mirko
Mirko,
Behavior method creation isn't harder than static method creation.
Regards,
Konstantin