Top Description Methods
org.eclipse.xtend.lib.macro

public Interface RegisterGlobalsContext

extends FileSystemSupport, FileLocations, UpstreamTypeLookup, SourceTypeLookup
Annotations
@Beta
Imports
org.eclipse.xtend.lib.macro.file.FileLocations, .FileSystemSupport, org.eclipse.xtend.lib.macro.services.SourceTypeLookup, .UpstreamTypeLookup, com.google.common.annotations.Beta

Provides services to be used during register-globals phase.
Author
Sven Efftinge
See Also
RegisterGlobalsParticipant

Method Summary

Modifier and TypeMethod and Description
public void
registerAnnotationType(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.

public void
registerClass(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.

public void
registerEnumerationType(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.

public void
registerInterface(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.

Inherited from org.eclipse.xtend.lib.macro.file.FileLocations:
getProjectFoldergetProjectSourceFoldersgetSourceFoldergetTargetFolder
Inherited from org.eclipse.xtend.lib.macro.file.FileSystemSupport:
existsgetCharsetgetChildrengetContentsgetContentsAsStreamgetLastModificationisFileisFoldertoURI
Inherited from org.eclipse.xtend.lib.macro.services.SourceTypeLookup:
findSourceAnnotationTypefindSourceClassfindSourceEnumerationTypefindSourceInterface
Inherited from org.eclipse.xtend.lib.macro.services.UpstreamTypeLookup:
findUpstreamTypefindUpstreamType

Method Detail

registerAnnotationTypeback to summary
public 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") 
Exceptions
IllegalArgumentException:
  • if the qualifiedName conflicts with any existing types.
  • if the qualifiedName is not a valid qualified name
registerClassback to summary
public 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") 
Exceptions
IllegalArgumentException:
  • if the qualifiedName conflicts with any existing types.
  • if the qualifiedName is not a valid qualified name
registerEnumerationTypeback to summary
public 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") 
Exceptions
IllegalArgumentException:
  • if the qualifiedName conflicts with any existing types.
  • if the qualifiedName is not a valid qualified name
registerInterfaceback to summary
public 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") 
Exceptions
IllegalArgumentException:
  • if the qualifiedName conflicts with any existing types.
  • if the qualifiedName is not a valid qualified name