public static CtField addField(CtClass fieldType, String fieldName, CtClass declaringClass, int modifier) throws CannotCompileException
  {
    return addField( fieldType, fieldName, declaringClass, modifier, null );
  }
public static CtField addField(CtClass fieldType, String fieldName, CtClass declaringClass, int modifier) throws CannotCompileException
  {
    return addField( fieldType, fieldName, declaringClass, modifier, null );
  }
public static CtField addField ( CtClass fieldType , String fieldName , CtClass declaringClass , int modifier ) throws CannotCompileException { return addField ( fieldType , fieldName , declaringClass , modifier , null ) ; }
Adds a field of the desired type to the declaring class.

@param fieldType
@param fieldName
@param declaringClass
@return
@throws CannotCompileException
Adds a field of the desired type to the declaring class .