public static StructGeneralAttribute createAttribute(String name) {
    if (ATTRIBUTE_CODE.name.equals(name)) {
      return new StructCodeAttribute();
    }
    else if (ATTRIBUTE_INNER_CLASSES.name.equals(name)) {
      return new StructInnerClassesAttribute();
    }
    else if (ATTRIBUTE_CONSTANT_VALUE.name.equals(name)) {
      return new StructConstantValueAttribute();
    }
    else if (ATTRIBUTE_SIGNATURE.name.equals(name)) {
      return new StructGenericSignatureAttribute();
    }
    else if (ATTRIBUTE_ANNOTATION_DEFAULT.name.equals(name)) {
      return new StructAnnDefaultAttribute();
    }
    else if (ATTRIBUTE_EXCEPTIONS.name.equals(name)) {
      return new StructExceptionsAttribute();
    }
    else if (ATTRIBUTE_ENCLOSING_METHOD.name.equals(name)) {
      return new StructEnclosingMethodAttribute();
    }
    else if (ATTRIBUTE_RUNTIME_VISIBLE_ANNOTATIONS.name.equals(name) || ATTRIBUTE_RUNTIME_INVISIBLE_ANNOTATIONS.name.equals(name)) {
      return new StructAnnotationAttribute();
    }
    else if (ATTRIBUTE_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS.name.equals(name) || ATTRIBUTE_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS.name.equals(name)) {
      return new StructAnnotationParameterAttribute();
    }
    else if (ATTRIBUTE_RUNTIME_VISIBLE_TYPE_ANNOTATIONS.name.equals(name) || ATTRIBUTE_RUNTIME_INVISIBLE_TYPE_ANNOTATIONS.name.equals(name)) {
      return new StructTypeAnnotationAttribute();
    }
    else if (ATTRIBUTE_LOCAL_VARIABLE_TABLE.name.equals(name)) {
      return new StructLocalVariableTableAttribute();
    }
    else if (ATTRIBUTE_LOCAL_VARIABLE_TYPE_TABLE.name.equals(name)) {
      return new StructLocalVariableTypeTableAttribute();
    }
    else if (ATTRIBUTE_BOOTSTRAP_METHODS.name.equals(name)) {
      return new StructBootstrapMethodsAttribute();
    }
    else if (ATTRIBUTE_SYNTHETIC.name.equals(name) || ATTRIBUTE_DEPRECATED.name.equals(name)) {
      return new StructGeneralAttribute();
    }
    else if (ATTRIBUTE_LINE_NUMBER_TABLE.name.equals(name)) {
      return new StructLineNumberTableAttribute();
    }
    else if (ATTRIBUTE_METHOD_PARAMETERS.name.equals(name)) {
      return new StructMethodParametersAttribute();
    }
    else if (ATTRIBUTE_MODULE.name.equals(name)) {
      return new StructModuleAttribute();
    }
    else if (ATTRIBUTE_RECORD.name.equals(name)) {
      return new StructRecordAttribute();
    } else if (ATTRIBUTE_PERMITTED_SUBCLASSES.name.equals(name)) {
      return new StructPermittedSubclassesAttribute();
    }
    else {
      return null; // unsupported attribute
    }
  }
public static StructGeneralAttribute createAttribute(String name)