container/profiles/src/main/java/org/mobicents/slee/container/deployment/profile/ClassGeneratorUtils.java
public static CtMethod generateGetter(CtField field, String interceptorAccess) throws NotFoundException, CannotCompileException
  {
    String getterName = "get" + capitalize(field.getName());
    
    CtMethod getter = CtNewMethod.getter( getterName, field );

    if(interceptorAccess != null)
      getter.setBody( interceptorAccess + "." + getterName + "($$);" );

    field.getDeclaringClass().addMethod(getter);

    return getter;
  }
public static CtMethod generateGetter(CtField field, String interceptorAccess) throws NotFoundException, CannotCompileException
  {
    String getterName = "get" + capitalize(field.getName());
    
    CtMethod getter = CtNewMethod.getter( getterName, field );

    if(interceptorAccess != null)
      getter.setBody( interceptorAccess + "." + getterName + "($$);" );

    field.getDeclaringClass().addMethod(getter);

    return getter;
  }
Generates a getter for the field (get<FieldName>) and adds it to the declaring class.

@param field
@param interceptorAccess
@return
@throws NotFoundException
@throws CannotCompileException