docs: public Object getAttribute(Class sender, Object object, String attribute, boolean useSuper, boolean fromInsideClass) {
          checkInitalised();
  
          boolean isStatic = theClass != Class.class && object instanceof Class;
          if (isStatic && object != theClass) {
              MetaClass mc = registry.getMetaClass((Class) object);
              return mc.getAttribute(sender, object, attribute, useSuper);
          }
  
          MetaProperty mp = getMetaProperty(sender, attribute, useSuper, isStatic);
  
          if (mp != null) {
              if (mp instanceof MetaBeanProperty) {
                  MetaBeanProperty mbp = (MetaBeanProperty) mp;
                  mp = mbp.getField();
              }
              try {
                  // delegate the get operation to the metaproperty
                  if (mp != null) return mp.getProperty(object);
              } catch (Exception e) {
                  throw new GroovyRuntimeException("Cannot read field: " + attribute, e);
              }
          }
  
          throw new MissingFieldException(attribute, theClass);
      }