static <T extends Callback> T getFirstCallbackOfType(Class<T> callbackClass,
			Callback[] callbackArray) {
		if (callbackArray == null) {
			return null;
		}

		for (Callback cb : callbackArray) {
			if (callbackClass == cb.getClass()) {
				return callbackClass.cast(cb);
			}
		}
		return null;
	}
Find the first callback of a specific type in the list and returns it.

@param <T> the type of callback
@param callbackClass the callback class (ie. Namecallback.class)
@param callbackArray array of callbacks to search
@return callback instance that is of type T, or null if not found
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/security/AuthenticationModule.java