private void buildSpec() {
    SpecUtil.checkIsSpec(clazz);

    SpecMetadata metadata = clazz.getAnnotation(SpecMetadata.class);
    spec.setParent(null);
    spec.setPackage(ReflectionUtil.getPackageName(clazz));
    spec.setName(clazz.getSimpleName());
    spec.setLine(metadata.line());
    spec.setReflection(clazz);
    spec.setFilename(metadata.filename());
  }
Builds a SpecInfo from a Class instance.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/runtime/SpecInfoBuilder.java