core/src/main/java/com/orientechnologies/orient/core/sql/parser/OCreateIndexStatement.java
private OClass getIndexClass(OCommandContext ctx) {
    if (className == null) {
      return null;
    }
    OClass result = ctx.getDatabase().getMetadata().getSchema().getClass(className.getStringValue());
    if (result == null) {
      throw new OCommandExecutionException("Cannot find class " + className);
    }
    return result;
  }
private OClass getIndexClass(OCommandContext ctx) {
    if (className == null) {
      return null;
    }
    OClass result = ctx.getDatabase().getMetadata().getSchema().getClass(className.getStringValue());
    if (result == null) {
      throw new OCommandExecutionException("Cannot find class " + className);
    }
    return result;
  }
calculates the indexed class based on the class name