Class PseudoType

  • All Implemented Interfaces:
    IVilType

    public final class PseudoType
    extends java.lang.Object
    implements IVilType
    Just a type for types. TypeDescriptor is also considered equivalent to PseudoType and Class for convenience of writing artifacts and types. This is handled by explicit type conversion before a call.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • PseudoType

        private PseudoType()
        Prevents external instantiation.
    • Method Detail

      • equals

        public static boolean equals​(TypeDescriptor<?> type,
                                     java.lang.String string)
        Represents the equality operation for types vs. Strings (legacy). Use simple or qualified name of type for comparison.
        Parameters:
        type - the type to compare
        string - the string to compare
        Returns:
        string == type.getName() || string == type.getQualifiedName()
      • notEquals

        public static boolean notEquals​(TypeDescriptor<?> type,
                                        java.lang.String string)
        Represents the un-equality operation for types vs. Strings (legacy). Use simple or qualified name of type for comparison.
        Parameters:
        type - the type to compare
        string - the string to compare
        Returns:
        string != type.getName() && string != type.getQualifiedName()
      • equals

        public static boolean equals​(TypeDescriptor<?> type1,
                                     TypeDescriptor<?> type2)
        Represents the equality operation for types.
        Parameters:
        type1 - the first type to compare
        type2 - the second type to compare
        Returns:
        type1 != type2
      • notEquals

        public static boolean notEquals​(TypeDescriptor<?> type1,
                                        TypeDescriptor<?> type2)
        Represents the un-equality operation for types.
        Parameters:
        type1 - the first type to compare
        type2 - the second type to compare
        Returns:
        type1 != type2
      • toString

        public static java.lang.String toString​(TypeDescriptor<?> type)
        Turns a descriptor into its name (legacy).
        Parameters:
        type - the type
        Returns:
        the name
      • getName

        public static java.lang.String getName​(TypeDescriptor<?> type)
        Returns the name of type.
        Parameters:
        type - the type
        Returns:
        the name of type
      • getQualifiedName

        public static java.lang.String getQualifiedName​(TypeDescriptor<?> type)
        Returns the qualified name of type.
        Parameters:
        type - the type
        Returns:
        the qualified name of type
      • isTypeOf

        public static boolean isTypeOf​(java.lang.Object ob,
                                       TypeDescriptor<?> type)
        Returns whether type is of the same type as ob. This method may be "override" by more specific types that cannot be obtained from the default type factory.
        Parameters:
        ob - the object to determine the type for
        type - the type to compare with
        Returns:
        true if type is of the same type as ob, false else
      • isKindOf

        public static boolean isKindOf​(java.lang.Object ob,
                                       TypeDescriptor<?> type)
        Returns whether type is of the same or a super type as ob. This method may be "override" by more specific types that cannot be obtained from the default type factory.
        Parameters:
        ob - the object to determine the type for
        type - the type to compare with
        Returns:
        true if type is of the same or a super type as ob, false else
      • allInstances

        public static Set<?> allInstances​(TypeDescriptor<?> type)
        Provides access to all instances of this type in the configuration.
        Parameters:
        type - the type to return all instances for
        Returns:
        all instances