public static Type of(Class<? extends Identifiable> objectType) {

            for (Type type : Type.values()) {
                if (type.getObjectType().isAssignableFrom(objectType))
                    return type;
            }

            return null;

        }
Returns the Directory.Type representing the type of a Directory that
could contain an object having the given class. The class may be a
subclass of the overall base class of the objects stored within the
Directory.

@param objectType
    The class to determine the Directory.Type of.

@return
    The Directory.Type representing the type of a Directory that
    could contain an object having the given class, or null if there
    is no such Directory available via the UserContext interface.
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Directory.java