Class TypesImpl


  • public final class TypesImpl
    extends Types
    An access class for various Type related operations
    • Method Detail

      • getOrAdd

        public TypeImpl getOrAdd​(Types.Predefined type,
                                 Consumer<TypeStructureBuilder> builderCallback)
        Description copied from class: Types
        Retrieve the given type or create it a-new if it hasn't been added yet. The type values will be stored in an associated constant pool.
        Specified by:
        getOrAdd in class Types
        Parameters:
        type - the type to retrieve
        builderCallback - will be called lazily when the type is about to be initialized
        Returns:
        the corresponding type instance
      • getOrAdd

        public TypeImpl getOrAdd​(String name,
                                 boolean withConstantPool,
                                 Consumer<TypeStructureBuilder> builderCallback)
        Description copied from class: Types
        Retrieve the given type or create it a-new if it hasn't been added yet.
        Specified by:
        getOrAdd in class Types
        Parameters:
        name - the name of the type to retrieve
        withConstantPool - should the type values use an associated constant pool
        builderCallback - will be called lazily when the type is about to be initialized
        Returns:
        the corresponding type instance
      • getOrAdd

        public TypeImpl getOrAdd​(Types.Predefined type,
                                 String supertype,
                                 Consumer<TypeStructureBuilder> builderCallback)
        Description copied from class: Types
        Retrieve the given type or create it a-new if it hasn't been added yet.
        Specified by:
        getOrAdd in class Types
        Parameters:
        type - the type to retrieve
        supertype - the super type name
        builderCallback - will be called lazily when the type is about to be initialized
        Returns:
        the corresponding type instance
      • getOrAdd

        public TypeImpl getOrAdd​(String name,
                                 String supertype,
                                 boolean withConstantPool,
                                 Consumer<TypeStructureBuilder> builderCallback)
        Description copied from class: Types
        Retrieve the given type or create it a-new if it hasn't been added yet.
        Specified by:
        getOrAdd in class Types
        Parameters:
        name - the name of the type to retrieve
        supertype - the super type name
        withConstantPool - should the type values use an associated constant pool
        builderCallback - will be called lazily when the type is about to be initialized
        Returns:
        the corresponding type instance
      • getOrAdd

        public TypeImpl getOrAdd​(String name,
                                 String supertype,
                                 boolean withConstantPool,
                                 TypeStructure typeStructure)
        Description copied from class: Types
        Retrieve the given type or create it a-new if it hasn't been added yet.
        Specified by:
        getOrAdd in class Types
        Parameters:
        name - the name of the type to retrieve
        supertype - the super type name
        withConstantPool - should the type values use an associated constant pool
        typeStructure - the type structure definition
        Returns:
        the corresponding type instance
      • getOrAdd

        public TypeImpl getOrAdd​(String name,
                                 Consumer<TypeStructureBuilder> builderCallback)
        Description copied from class: Types
        Retrieve the given type or create it a-new if it hasn't been added yet.
        Specified by:
        getOrAdd in class Types
        Parameters:
        name - the name of the type to retrieve
        builderCallback - will be called lazily when the type is about to be initialized
        Returns:
        the corresponding type instance
      • getOrAdd

        public TypeImpl getOrAdd​(String name,
                                 String supertype,
                                 Consumer<TypeStructureBuilder> builderCallback)
        Description copied from class: Types
        Retrieve the given type or create it a-new if it hasn't been added yet. The type values will be stored in an associated constant pool.
        Specified by:
        getOrAdd in class Types
        Parameters:
        name - the name of the type to retrieve
        supertype - the super type name
        builderCallback - will be called lazily when the type is about to be initialized
        Returns:
        the corresponding type instance
      • getOrAdd

        public TypeImpl getOrAdd​(String name,
                                 String supertype,
                                 TypeStructure typeStructure)
        Description copied from class: Types
        Retrieve the given type or create it a-new if it hasn't been added yet. The type values will be stored in an associated constant pool.
        Specified by:
        getOrAdd in class Types
        Parameters:
        name - the name of the type to retrieve
        supertype - the super type name
        typeStructure - the type structure definition
        Returns:
        the corresponding type instance
      • getType

        public TypeImpl getType​(String name)
        Description copied from class: Types
        Retrieve the type by its name.
        Specified by:
        getType in class Types
        Parameters:
        name - the type name
        Returns:
        the registered type or null
      • getType

        public TypeImpl getType​(String name,
                                boolean asResolvable)
        Description copied from class: Types
        Retrieve the type by its name. If the type hasn't been added yet a ResolvableType wrapper may be returned.
        Specified by:
        getType in class Types
        Parameters:
        name - the type name
        asResolvable - if true a ResolvableType wrapper will be returned instead of null for non-existent type
        Returns:
        an existing Type type, null or a ResolvableType wrapper
      • resolveAll

        public void resolveAll()
        Resolve all unresolved types. After this method had been called all calls to ResolvableType.isResolved() will return true if the target type was properly registered