private void _infer(final JvmGenericType result, final TestConfiguration element) { result.setAbstract(true); }
@Override public void setAbstract(final boolean isAbstract) { this.checkMutable(); this.getDelegate().setAbstract(isAbstract); }
@Override public void apply(final JvmGenericType it) { it.setPackageName(processorPackageName); CharSequence _javadocProcessorClass = PatternMatchProcessorClassInferrer.this._javadocInferrer.javadocProcessorClass(pattern); String _string = _javadocProcessorClass.toString(); PatternMatchProcessorClassInferrer.this._eMFJvmTypesBuilder.setDocumentation(it, _string); it.setAbstract(true); EList<JvmTypeReference> _superTypes = it.getSuperTypes(); JvmTypeReference _typeRef = PatternMatchProcessorClassInferrer.this.builder.typeRef(matchClass); JvmTypeReference _typeRef_1 = PatternMatchProcessorClassInferrer.this.builder.typeRef(IMatchProcessor.class, _typeRef); PatternMatchProcessorClassInferrer.this._eMFJvmTypesBuilder.<JvmTypeReference>operator_add(_superTypes, _typeRef_1); } };
/** * Creates a public interface declaration, associated to the given sourceElement. It sets the given name, which might be * fully qualified using the standard Java notation. * * @param sourceElement * the sourceElement the resulting element is associated with. * @param name * the qualified name of the resulting class. * @param initializer * the initializer to apply on the created interface element. If <code>null</code>, the interface won't be initialized. * * @return a {@link JvmGenericType} representing a Java class of the given name, <code>null</code> * if sourceElement or name are <code>null</code>. */ /* @Nullable */ public JvmGenericType toInterface(/* @Nullable */ EObject sourceElement, /* @Nullable */ String name, /* @Nullable */ Procedure1<? super JvmGenericType> initializer) { final JvmGenericType result = createJvmGenericType(sourceElement, name); if (result == null) return null; result.setInterface(true); result.setAbstract(true); associate(sourceElement, result); return initializeSafely(result, initializer); }
/** * Infers the {@link Consumer} implementation class from a {@link Pattern}. */ public JvmDeclaredType inferProcessorClass(final Pattern pattern, final boolean isPrelinkingPhase, final String processorPackageName, final JvmType matchClass, final JvmTypeReferenceBuilder builder, final JvmAnnotationReferenceBuilder annBuilder, final EMFPatternLanguageGeneratorConfig config) { this.builder = builder; this.annBuilder = annBuilder; final Procedure1<JvmGenericType> _function = (JvmGenericType it) -> { EMFPatternLanguageGeneratorConfig.MatcherGenerationStrategy _matcherGenerationStrategy = config.getMatcherGenerationStrategy(); boolean _equals = Objects.equal(_matcherGenerationStrategy, EMFPatternLanguageGeneratorConfig.MatcherGenerationStrategy.NESTED_CLASS); it.setStatic(_equals); it.setPackageName(processorPackageName); this._eMFJvmTypesBuilder.setDocumentation(it, this._javadocInferrer.javadocProcessorClass(pattern).toString()); it.setAbstract(true); EList<JvmTypeReference> _superTypes = it.getSuperTypes(); JvmTypeReference _typeRef = this.builder.typeRef(Consumer.class, this.builder.typeRef(matchClass)); this._eMFJvmTypesBuilder.<JvmTypeReference>operator_add(_superTypes, _typeRef); this._eMFJvmTypesBuilder.setFileHeader(it, this._eMFPatternLanguageJvmModelInferrerUtil.getFileComment(pattern)); }; final JvmGenericType processorClass = this._eMFJvmTypesBuilder.toClass(pattern, this._eMFPatternLanguageJvmModelInferrerUtil.processorClassName(pattern, config.getMatcherGenerationStrategy()), _function); return processorClass; }
protected void initialize(XtendInterface source, JvmGenericType inferredJvmType) { inferredJvmType.setVisibility(source.getVisibility()); inferredJvmType.setStatic(source.isStatic() && !isTopLevel(source)); inferredJvmType.setAbstract(true); inferredJvmType.setStrictFloatingPoint(source.isStrictFloatingPoint()); translateAnnotationsTo(source.getAnnotations(), inferredJvmType); for (JvmTypeReference intf : source.getExtends()) { inferredJvmType.getSuperTypes().add(jvmTypesBuilder.cloneWithProxies(intf)); } fixTypeParameters(inferredJvmType); for (XtendMember member : source.getMembers()) { if (member instanceof XtendField || (member instanceof XtendFunction && ((XtendFunction) member).getName() != null)) { transform(member, inferredJvmType, false); } } jvmTypesBuilder.copyDocumentationTo(source, inferredJvmType); nameClashResolver.resolveNameClashes(inferredJvmType); }
final JvmGenericType innerType = this.typesFactory.createJvmGenericType(); innerType.setInterface(false); innerType.setAbstract(false); innerType.setVisibility(JvmVisibility.PUBLIC); innerType.setStatic(true);
inferredJvmType.setAbstract(true); setVisibility(inferredJvmType, source); inferredJvmType.setStatic(false);
setVisibility(inferredJvmType, source); final boolean isAbstract = source.isAbstract() || Utils.hasAbstractMember(source); inferredJvmType.setAbstract(isAbstract); inferredJvmType.setFinal(!isAbstract && source.isFinal());
inferredJvmType.setAbstract(source.isAbstract()); inferredJvmType.setStrictFloatingPoint(source.isStrictFloatingPoint()); if (!inferredJvmType.isAbstract()) {
inferredJvmType.setStatic(false); final boolean isAbstract = source.isAbstract() || Utils.hasAbstractMember(source); inferredJvmType.setAbstract(isAbstract); inferredJvmType.setStrictFloatingPoint(false); inferredJvmType.setFinal(!isAbstract && source.isFinal());
inferredJvmType.setAbstract(false); inferredJvmType.setStrictFloatingPoint(false); if (!inferredJvmType.isAbstract()) {
inferredJvmType.setStatic(false); final boolean isAbstract = source.isAbstract() || Utils.hasAbstractMember(source); inferredJvmType.setAbstract(isAbstract); inferredJvmType.setStrictFloatingPoint(false); inferredJvmType.setFinal(!isAbstract && source.isFinal());