@Override public boolean isFinal() { return this.getDelegate().isFinal(); }
protected JvmOperation findImplementingOperation(List<JvmType> rawTypes) { if (rawTypes.size() == 1) { JvmType rawType = rawTypes.get(0); if (rawType.eClass() == TypesPackage.Literals.JVM_GENERIC_TYPE) { JvmGenericType castedRawType = (JvmGenericType) rawType; if (!castedRawType.isFinal()) { Iterable<JvmFeature> features = castedRawType.getAllFeatures(); JvmOperation result = null; for (JvmFeature feature : features) { if (feature.eClass() == TypesPackage.Literals.JVM_OPERATION) { JvmOperation op = (JvmOperation) feature; if (isValidFunction(op)) { if (result == null) result = op; else { return null; } } } } return result; } } } return null; }
@Check public void checkSuperTypes(AnonymousClass anonymousClass) { JvmGenericType inferredType = associations.getInferredType(anonymousClass); if (inferredType != null) { JvmTypeReference superTypeRef = Iterables.getLast(inferredType.getSuperTypes()); JvmType superType = superTypeRef.getType(); if(superType instanceof JvmGenericType && ((JvmGenericType) superType).isFinal()) error("Attempt to override final class", anonymousClass.getConstructorCall(), XCONSTRUCTOR_CALL__CONSTRUCTOR, INSIGNIFICANT_INDEX, OVERRIDDEN_FINAL); } }
if (jvm.isFinal()) { bitset.set(4);
protected ITreeAppendable _generateModifier(final JvmGenericType it, final ITreeAppendable appendable, final GeneratorConfig config) { ITreeAppendable _xblockexpression = null; { this.generateVisibilityModifier(it, appendable); boolean _isInterface = it.isInterface(); boolean _not = (!_isInterface); if (_not) { boolean _isStatic = it.isStatic(); if (_isStatic) { appendable.append("static "); } boolean _isAbstract = it.isAbstract(); if (_isAbstract) { appendable.append("abstract "); } } boolean _isFinal = it.isFinal(); if (_isFinal) { appendable.append("final "); } ITreeAppendable _xifexpression = null; boolean _isStrictFloatingPoint = it.isStrictFloatingPoint(); if (_isStrictFloatingPoint) { _xifexpression = appendable.append("strictfp "); } _xblockexpression = _xifexpression; } return _xblockexpression; }
@Check public void checkSuperTypes(XtendClass xtendClass) { JvmTypeReference superClass = xtendClass.getExtends(); if (superClass != null && superClass.getType() != null) { if (!(superClass.getType() instanceof JvmGenericType) || ((JvmGenericType) superClass.getType()).isInterface()) { error("Superclass must be a class", XTEND_CLASS__EXTENDS, CLASS_EXPECTED); } else { if (((JvmGenericType) superClass.getType()).isFinal()) { error("Attempt to override final class", XTEND_CLASS__EXTENDS, OVERRIDDEN_FINAL); } checkWildcardSupertype(xtendClass, superClass, XTEND_CLASS__EXTENDS, INSIGNIFICANT_INDEX); } } for (int i = 0; i < xtendClass.getImplements().size(); ++i) { JvmTypeReference implementedType = xtendClass.getImplements().get(i); if (!isInterface(implementedType.getType()) && !isAnnotation(implementedType.getType())) { error("Implemented interface must be an interface", XTEND_CLASS__IMPLEMENTS, i, INTERFACE_EXPECTED); } checkWildcardSupertype(xtendClass, implementedType, XTEND_CLASS__IMPLEMENTS, i); } JvmGenericType inferredType = associations.getInferredType(xtendClass); if (inferredType != null && hasCycleInHierarchy(inferredType, Sets.<JvmGenericType> newHashSet())) { error("The inheritance hierarchy of " + notNull(xtendClass.getName()) + " contains cycles", XTEND_TYPE_DECLARATION__NAME, CYCLIC_INHERITANCE); } }
&& context.getGeneratorConfig2().isGenerateInlineAnnotation() && !source.isAbstract() && !container.isInterface() && (source.isStatic() || source.isFinal() || container.isFinal()) && context.getParentContext() == null && this.annotationFinder.findAnnotation(operation, Inline.class) == null) {
JvmGenericType castedLeftType = (JvmGenericType) leftType; EClass rightEClass = rightType.eClass(); if (castedLeftType.isFinal()) { if (rightEClass == TypesPackage.Literals.JVM_TYPE_PARAMETER && getSuperType(right, castedLeftType) != null) { return flags | SUCCESS | SUBTYPE;