/** Generate the extended types for the given SARL statement. * * @param context the context of the generation. * @param owner the JVM element to change. * @param defaultJvmType the default JVM type. * @param defaultSarlType the default SARL type. * @param supertype the supertype. */ protected void appendConstrainedExtends( GenerationContext context, JvmGenericType owner, Class<?> defaultJvmType, Class<? extends XtendTypeDeclaration> defaultSarlType, JvmParameterizedTypeReference supertype) { final List<? extends JvmParameterizedTypeReference> supertypes; if (supertype == null) { supertypes = Collections.emptyList(); } else { supertypes = Collections.singletonList(supertype); } appendConstrainedExtends(context, owner, defaultJvmType, defaultSarlType, supertypes); }
appendConstrainedExtends(context, inferredJvmType, Capacity.class, SarlCapacity.class, source.getExtends());
appendConstrainedExtends(context, inferredJvmType, Agent.class, SarlAgent.class, source.getExtends());
appendConstrainedExtends(context, inferredJvmType, Event.class, SarlEvent.class, source.getExtends());
appendConstrainedExtends(context, inferredJvmType, Behavior.class, SarlBehavior.class, source.getExtends());
appendConstrainedExtends(context, inferredJvmType, Skill.class, SarlSkill.class, source.getExtends()); appendConstrainedImplements(context, inferredJvmType, Capacity.class, SarlCapacity.class, source.getImplements());