code: public static Variable getDeclaredVariable(Class<?> type, String name) {
          if (!isGeneratedClass(type))
              return null;
          Variable var = getVariable(type, name);
          if (null == var && !type.isInterface())
              return getVariable(getNewInstance(type), name);
          return var;
      }
docs: /*
  Get variable from either class static or object instance namespaces