Interface RegisterGlobalsContext

All Superinterfaces:
FileLocations, FileSystemSupport, SourceTypeLookup, UpstreamTypeLookup

@Beta public interface RegisterGlobalsContext extends FileSystemSupport, FileLocations, UpstreamTypeLookup, SourceTypeLookup
Provides services to be used during register-globals phase.
Author:
Sven Efftinge
See Also:
  • Method Details

    • registerClass

      void registerClass(String qualifiedName) throws IllegalArgumentException
      Registers and creates an empty Java class with given qualified name If the name's namespace part refers to another derived Java type, this type will become a static member of that type. For instance, given an
        // creates a type 'MyClass' in the package 'my.pack'
        registerClass("my.pack.MyClass") 
       
        // creates a type 'MyInnerClass' as a member of the type 'my.pack.MyClass'
        registerClass("my.pack.MyClass.MyInnerClass") 
       
      Parameters:
      qualifiedName -
      Throws:
      IllegalArgumentException - if the qualifiedName conflicts with any existing types.
      IllegalArgumentException - if the qualifiedName is not a valid qualified name
    • registerInterface

      void registerInterface(String qualifiedName) throws IllegalArgumentException
      Registers and creates an empty Java interface with given qualified name If the name's namespace part refers to another derived Java type, this type will become a static member of that type. For instance, given an
        // creates a type 'MyClass' in the package 'my.pack'
        registerClass("my.pack.MyClass") 
       
        // creates a type 'MyInnerClass' as a member of the type 'my.pack.MyClass'
        registerClass("my.pack.MyClass.MyInnerClass") 
       
      Parameters:
      qualifiedName -
      Throws:
      IllegalArgumentException - if the qualifiedName conflicts with any existing types.
      IllegalArgumentException - if the qualifiedName is not a valid qualified name
    • registerAnnotationType

      void registerAnnotationType(String qualifiedName) throws IllegalArgumentException
      Registers and creates an empty Java annotation type with given qualified name If the name's namespace part refers to another derived Java type, this type will become a static member of that type. For instance, given an
        // creates a type 'MyClass' in the package 'my.pack'
        registerClass("my.pack.MyClass") 
       
        // creates a type 'MyInnerClass' as a member of the type 'my.pack.MyClass'
        registerClass("my.pack.MyClass.MyInnerClass") 
       
      Parameters:
      qualifiedName -
      Throws:
      IllegalArgumentException - if the qualifiedName conflicts with any existing types.
      IllegalArgumentException - if the qualifiedName is not a valid qualified name
    • registerEnumerationType

      void registerEnumerationType(String qualifiedName) throws IllegalArgumentException
      Registers and creates an empty Java enumeration type with given qualified name If the name's namespace part refers to another derived Java type, this type will become a static member of that type. For instance, given an
        // creates a type 'MyClass' in the package 'my.pack'
        registerClass("my.pack.MyClass") 
       
        // creates a type 'MyInnerClass' as a member of the type 'my.pack.MyClass'
        registerClass("my.pack.MyClass.MyInnerClass") 
       
      Parameters:
      qualifiedName -
      Throws:
      IllegalArgumentException - if the qualifiedName conflicts with any existing types.
      IllegalArgumentException - if the qualifiedName is not a valid qualified name