Class ArrayJavaType

    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • is

        public boolean is​(String fullyQualifiedName)
        Description copied from interface: Type
        Check whether a type is the one designed by the fully qualified name.
           Type type;
           type.is("int");
           type.is("int[]");
           type.is("java.lang.String[]");
           type.is("java.lang.Object");
        
        Specified by:
        is in interface Type
        Overrides:
        is in class JavaType
        Parameters:
        fullyQualifiedName - fully qualified name to check. Use "[]" for arrays and the simple name for primitive type ("int", "byte"...).
        Returns:
        true if the type is the one looked for. false otherwise.
      • isSubtypeOf

        public boolean isSubtypeOf​(String fullyQualifiedName)
        Description copied from interface: Type
        Check whether a type is a subtype of the one designed by the fully qualified name.

        This method will consider implemented interfaces as well as superclasses.

           Type type;
           type.isSubtypeOf("Object[]");
           type.isSubtypeOf("org.mypackage.MyClass");
           type.isSubtypeOf("org.mypackage.MyInterface");
           type.isSubtypeOf("java.lang.Object");
        
        Specified by:
        isSubtypeOf in interface Type
        Overrides:
        isSubtypeOf in class JavaType
        Parameters:
        fullyQualifiedName - fully qualified name to check in the type hierarchy. Use "[]" for arrays.
        Returns:
        true if the type is the one passed in parameter or have this type in its hierarchy. false otherwise.
      • isSubtypeOf

        public boolean isSubtypeOf​(Type superType)
        Description copied from interface: Type
        Check whether a type is a subtype of another.

        This method will consider implemented interfaces as well as superclasses.

           Type type, myOtherType;
           type.isSubtypeOf(myOtherType);
        
        Specified by:
        isSubtypeOf in interface Type
        Overrides:
        isSubtypeOf in class JavaType
        Parameters:
        superType - instance of a potential superType.
        Returns:
        true if types are equivalent or if the one passed in parameter is in the hierarchy. false otherwise.