Class PseudoType
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.vilTypes.PseudoType
-
- All Implemented Interfaces:
IVilType
public final class PseudoType extends java.lang.Object implements IVilType
Just a type for types.TypeDescriptoris also considered equivalent toPseudoTypeand Class for convenience of writing artifacts and types. This is handled by explicit type conversion before a call.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Modifier Constructor Description privatePseudoType()Prevents external instantiation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<?>allInstances(TypeDescriptor<?> type)Provides access to all instances of this type in the configuration.static booleanequals(TypeDescriptor<?> type, java.lang.String string)Represents the equality operation for types vs.static booleanequals(TypeDescriptor<?> type1, TypeDescriptor<?> type2)Represents the equality operation for types.static java.lang.StringgetName(TypeDescriptor<?> type)Returns the name oftype.static java.lang.StringgetQualifiedName(TypeDescriptor<?> type)Returns the qualified name oftype.static TypeDescriptor<?>getType(TypeDescriptor<?> value)Returns the type ofvalue.static booleanisKindOf(java.lang.Object ob, TypeDescriptor<?> type)Returns whethertypeis of the same or a super type asob.static booleanisTypeOf(java.lang.Object ob, TypeDescriptor<?> type)Returns whethertypeis of the same type asob.static booleannotEquals(TypeDescriptor<?> type, java.lang.String string)Represents the un-equality operation for types vs.static booleannotEquals(TypeDescriptor<?> type1, TypeDescriptor<?> type2)Represents the un-equality operation for types.static java.lang.StringtoString(TypeDescriptor<?> type)Turns a descriptor into its name (legacy).
-
-
-
Method Detail
-
getType
public static TypeDescriptor<?> getType(TypeDescriptor<?> value)
Returns the type ofvalue. "Overrides"PseudoAny.getType(Object).- Parameters:
value- the type to return the type for- Returns:
- the type of object (null if
obis null)
-
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 comparestring- 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 comparestring- 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 comparetype2- 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 comparetype2- 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 oftype.- Parameters:
type- the type- Returns:
- the name of
type
-
getQualifiedName
public static java.lang.String getQualifiedName(TypeDescriptor<?> type)
Returns the qualified name oftype.- Parameters:
type- the type- Returns:
- the qualified name of
type
-
isTypeOf
public static boolean isTypeOf(java.lang.Object ob, TypeDescriptor<?> type)Returns whethertypeis of the same type asob. 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 fortype- the type to compare with- Returns:
trueiftypeis of the same type asob,falseelse
-
isKindOf
public static boolean isKindOf(java.lang.Object ob, TypeDescriptor<?> type)Returns whethertypeis of the same or a super type asob. 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 fortype- the type to compare with- Returns:
trueiftypeis of the same or a super type asob,falseelse
-
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
-
-