Package org.eclipse.xtend.lib.macro
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.- See Also:
RegisterGlobalsParticipant- Noimplement:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidregisterAnnotationType(java.lang.String qualifiedName)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.voidregisterClass(java.lang.String qualifiedName)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.voidregisterEnumerationType(java.lang.String qualifiedName)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.voidregisterInterface(java.lang.String qualifiedName)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.-
Methods inherited from interface org.eclipse.xtend.lib.macro.file.FileLocations
getProjectFolder, getProjectSourceFolders, getSourceFolder, getTargetFolder
-
Methods inherited from interface org.eclipse.xtend.lib.macro.file.FileSystemSupport
exists, getCharset, getChildren, getContents, getContentsAsStream, getLastModification, isFile, isFolder, toURI
-
Methods inherited from interface org.eclipse.xtend.lib.macro.services.SourceTypeLookup
findSourceAnnotationType, findSourceClass, findSourceEnumerationType, findSourceInterface
-
Methods inherited from interface org.eclipse.xtend.lib.macro.services.UpstreamTypeLookup
findUpstreamType, findUpstreamType
-
-
-
-
Method Detail
-
registerClass
void registerClass(java.lang.String qualifiedName) throws java.lang.IllegalArgumentExceptionRegisters 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:
java.lang.IllegalArgumentException- if the qualifiedName conflicts with any existing types.java.lang.IllegalArgumentException- if thequalifiedNameis not a valid qualified name
-
registerInterface
void registerInterface(java.lang.String qualifiedName) throws java.lang.IllegalArgumentExceptionRegisters 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:
java.lang.IllegalArgumentException- if the qualifiedName conflicts with any existing types.java.lang.IllegalArgumentException- if thequalifiedNameis not a valid qualified name
-
registerAnnotationType
void registerAnnotationType(java.lang.String qualifiedName) throws java.lang.IllegalArgumentExceptionRegisters 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:
java.lang.IllegalArgumentException- if the qualifiedName conflicts with any existing types.java.lang.IllegalArgumentException- if thequalifiedNameis not a valid qualified name
-
registerEnumerationType
void registerEnumerationType(java.lang.String qualifiedName) throws java.lang.IllegalArgumentExceptionRegisters 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:
java.lang.IllegalArgumentException- if the qualifiedName conflicts with any existing types.java.lang.IllegalArgumentException- if thequalifiedNameis not a valid qualified name
-
-