public static FileSystemInfoRec fromClass(Class<? extends GFileSystem> fsClazz) {
		FileSystemInfo fsi = fsClazz.getAnnotation(FileSystemInfo.class);
		if (fsi == null) {
			return null;
		}
		String fsType = fsi.type();
		if (!FSTYPE_VALID_REGEX.matcher(fsType).matches()) {
			Msg.error(FileSystemInfoRec.class, "Bad GFileSystem type specified for " +
				fsClazz.getName() + ": " + fsType + ", skipping.");
			return null;
		}

		Class<? extends GFileSystemFactory<?>> factoryClass = fsi.factory();
		GFileSystemFactory<?> factory = null;
		try {
			Constructor<? extends GFileSystemFactory<?>> ctor = factoryClass.getConstructor();
			factory = ctor.newInstance();
		}
		catch (InstantiationException | IllegalAccessException | NoSuchMethodException
				| SecurityException | IllegalArgumentException | InvocationTargetException e) {
			Msg.error(FileSystemInfoRec.class,
				"Error when creating GFileSystem factory " + factoryClass.getName(), e);
			return null;
		}

		// Hack to allow GFileSystemBaseFactory to know which fsclass is using it
		// so instances can be created by the single GFileSystemBaseFactory impl.
		if (factory instanceof GFileSystemBaseFactory) {
			((GFileSystemBaseFactory) factory).setFileSystemClass(
				(Class<? extends GFileSystemBase>) fsClazz);
		}

		FileSystemInfoRec fsir =
			new FileSystemInfoRec(fsType, fsi.description(), fsi.priority(), fsClazz, factory);

		return fsir;
	}
Instantiate a new {@link FileSystemInfoRec} from the information found in the
{@link FileSystemInfo} annotation attached to the specified Class.

@param fsClazz class to query for file system info.
@return new {@link FileSystemInfoRec}, or null if the class doesn't have
valid file system meta data.
Ghidra/Features/Base/src/main/java/ghidra/formats/gfilesystem/factory/FileSystemInfoRec.java