protected boolean isFinal(LightweightTypeReference expressionTypeRef) { if (expressionTypeRef.isArray()) { return isFinal(expressionTypeRef.getComponentType()); } if (expressionTypeRef.isPrimitive()) return true; return expressionTypeRef.getType() instanceof JvmDeclaredType && ((JvmDeclaredType) expressionTypeRef.getType()).isFinal(); }
/** Replies if the given reference is referencing a final type. * * @param expressionTypeRef - the type reference to test. * @return <code>true</code> if the given type is final. */ public static boolean isFinal(LightweightTypeReference expressionTypeRef) { if (expressionTypeRef.isArray()) { return isFinal(expressionTypeRef.getComponentType()); } if (expressionTypeRef.isPrimitive()) { return true; } return expressionTypeRef.getType() instanceof JvmDeclaredType && ((JvmDeclaredType) expressionTypeRef.getType()).isFinal(); }
if (type.eClass() != TypesPackage.Literals.JVM_TYPE_PARAMETER && declaredType.isFinal()) { return null;
public SignatureHashBuilder appendSignature(JvmDeclaredType type) { if (type.getVisibility() != JvmVisibility.PRIVATE) { appendAnnotationReferences(type); appendVisibility(type.getVisibility()).append(" "); if (type.isAbstract()) append("abstract "); if (type.isStatic()) append("static "); if (type.isFinal()) append("final "); append("class ").append(type.getIdentifier()); if (type instanceof JvmTypeParameterDeclarator) appendTypeParameters((JvmTypeParameterDeclarator) type); append("\n").appendSuperTypeSignatures(type).appendMemberSignatures(type, false); } return this; }