Bug 3811 Setter / Getter generates setter for final fields (1GEUMGT)
- private final String fName; - generate Setter and Getter - you get public void setName(String name) { fName= name; } which produces a compile error. NOTES: EG (6/5/2001 3:41:01 AM) not critical, can be documented. MA (02.08.2001 16:49:08) fixed in 200
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/codemanipulation/AddGetterSetterOperation.java
boolean isStatic= Flags.isStatic(field.getFlags());
			String typeName= Signature.toString(field.getTypeSignature());
			
			IType parentType= field.getDeclaringType();
			
			String lineDelim= StubUtility.getLineDelimiterUsed(parentType);
			int indent= StubUtility.getIndentUsed(field);
			
			
			String getterName= "get" + accessorName; 
			IMethod existing= JavaModelUtil.findMethod(getterName, new String[0], false, parentType);
			if (!(existing != null &&  querySkipExistingMethods(existing))) {			
				
				StringBuffer buf= new StringBuffer();
				buf.append("/**\n"); 
				buf.append(" * Gets the "); buf.append(argname); buf.append(".\n"); 
				buf.append(" * @return Returns a "); buf.append(typeName); buf.append('\n'); 
				buf.append(" */\n"); 
				buf.append("public "); 
				if (isStatic) {
					buf.append("static "); 
				}
				buf.append(typeName);
				buf.append(' '); buf.append(getterName);
				buf.append("() {\nreturn "); buf.append(fieldName); buf.append(";\n}\n"); 
				
				IJavaElement sibling= null;
				if (existing != null) {
					sibling= StubUtility.findSibling(existing);
					existing.delete(false, null);