Class IntType

All Implemented Interfaces:
ASTLocusTag.ASTLocusTagProvider, TypeComparator.SemanticEqualityOp, Cloneable
Direct Known Subclasses:
BitType, EnumType

public class IntType extends PrimitiveType implements Cloneable
  • Constructor Details

    • IntType

      public IntType(String name, SizeThunk size, boolean unsigned, int cvAttributes)
    • IntType

      public IntType(String name, SizeThunk size, boolean unsigned, int cvAttributes, ASTLocusTag astLocus)
    • IntType

      public IntType(String name, SizeThunk size, boolean unsigned, int cvAttributes, boolean isTypedef, boolean typedefUnsigned, ASTLocusTag astLocus)
      Only for HeaderParser!
      Parameters:
      name - the name
      size - the size
      unsigned - true if this instance is unsigned, not the typedef!
      cvAttributes - the cvAttributes for this instance, not for the typedef!
      isTypedef - true if this instance is a typedef variant
      typedefUnsigned - true if the typedef itself is unsigned
      astLocus - the location in source code
  • Method Details

    • hashCodeImpl

      protected int hashCodeImpl()
      Specified by:
      hashCodeImpl in class Type
    • equalsImpl

      protected boolean equalsImpl(Type arg)
      Specified by:
      equalsImpl in class Type
    • hashCodeSemanticsImpl

      protected int hashCodeSemanticsImpl()
      Specified by:
      hashCodeSemanticsImpl in class Type
    • equalSemanticsImpl

      protected boolean equalSemanticsImpl(Type arg)
      Specified by:
      equalSemanticsImpl in class Type
    • asInt

      public IntType asInt()
      Description copied from class: Type
      Casts this to an IntType or returns null if not an IntType.
      Overrides:
      asInt in class Type
    • isUnsigned

      public boolean isUnsigned()
      Indicates whether this type is unsigned
    • getCName

      public String getCName(boolean includeCVAttrs)
      Description copied from class: Type
      Returns the name of this type, optionally including const/volatile attributes. The returned string is suitable for use as a type specifier for native C.
      Overrides:
      getCName in class Type
    • toString

      public String toString()
      Description copied from class: Type
      Returns a string representation of this type. The returned string is suitable for use as a type specifier for native C. It does contain an expanded description of structs/unions, hence may not be suitable for type declarations.
      Overrides:
      toString in class Type
    • setTypedefName

      public boolean setTypedefName(String name)
      Description copied from class: Type
      Set the typedef name of this type and renders this type a typedef, if given name has a length.

      Method issues Type.clearCache(), to force re-evaluation of hashes.

      Overrides:
      setTypedefName in class Type