How to specify a super class in JvmInferrer [message #1739902] |
Fri, 05 August 2016 14:25  |
Eclipse User |
|
|
|
I want to generate a class with a super class, how do I do this with JvmModelInferrer?
The "superTypes +=" generates an "implements" clause but I need an "extends" clause.
Which variable I can use for that?
|
|
|
|
|
Re: How to specify a super class in JvmInferrer [message #1739912 is a reply to message #1739908] |
Fri, 05 August 2016 16:04   |
Eclipse User |
|
|
|
i cannot reproduce this
domainmodelexample:
class DomainmodelJvmModelInferrer extends AbstractModelInferrer {
@Inject extension JvmTypesBuilder
@Inject extension IQualifiedNameProvider
def dispatch infer(Entity entity, extension IJvmDeclaredTypeAcceptor acceptor, boolean prelinkingPhase) {
accept(entity.toClass( entity.fullyQualifiedName )) [
documentation = entity.documentation
superTypes += "demo.AbstractEntity".typeRef
]
}
}
|
|
|
|
|
|
|
|
Re: How to specify a super class in JvmInferrer [message #1740003 is a reply to message #1739932] |
Sun, 07 August 2016 19:20   |
Eclipse User |
|
|
|
Christian Dietrich wrote on Fri, 05 August 2016 14:02Olaf Bigalk <forums-noreply@xxxxxxxx> wrote:
> I discoverd that the "superTypes +=" does not work correctly if the
> referenced type could not be found in the generators context.
> May this be a bug ?
>
>
What do you mean by generators context
The context in which the generator runs including the generated classes.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04523 seconds