public final class CompositeFactory
extends java.lang.Object
Note: This class has to be extended to add new UNO-IDL code generation.
| Constructor and Description |
|---|
CompositeFactory() |
| Modifier and Type | Method and Description |
|---|---|
static IUnoComposite |
createAttribute(java.lang.String pName,
java.lang.String pType,
java.lang.String pFlags)
Creates an interface attribute.
|
static IUnoComposite |
createFile(org.eclipse.core.resources.IFile pFilehandle)
Creates a Uno composite representing a file from its filename.
|
static IUnoComposite |
createFileContent(java.lang.String pFullname)
Creates a uno composite representing the file content skeleton from the type name it should contain.
|
static IUnoComposite |
createInclude(java.lang.String pFullName)
Creates a Uno composite representing an include line.
|
static IUnoComposite |
createInterface(java.lang.String pName,
boolean pIsPublished,
java.lang.String[] pParentIntfNames)
Creates a Uno composite corresponding to an interface with its mandatory parent interfaces.
|
static IUnoComposite |
createInterfaceInheritance(java.lang.String pName,
boolean pOptional)
Creates a UNO composite representing an interface inheritance.
|
static IUnoComposite |
createMethod(java.lang.String pName,
java.lang.String pType)
Creates an interface method.
|
static IUnoComposite |
createMethodArgument(java.lang.String pName,
java.lang.String pType,
java.lang.String pDirection)
Create a method argument to be added to a method UNO composite.
|
static IUnoComposite |
createModuleDir(java.lang.String pFullName,
IUnoidlProject pProject)
Creates a Uno composite directory.
|
static IUnoComposite |
createModuleSpace(java.lang.String pName)
Creates a simple module namespace use.
|
static IUnoComposite |
createModulesSpaces(java.lang.String pFullName)
Simple convenient method calling
createModuleSpace(String) to create cascading modules namespaces. |
static IUnoComposite |
createService(java.lang.String pName)
Creates a default very basic service declaration only using the name and not published.
|
static IUnoComposite |
createService(java.lang.String pName,
boolean pIsPublished)
Creates a service declaration text with the default interface.
|
static IUnoComposite |
createService(java.lang.String pName,
boolean pIsPublished,
java.lang.String pInterfaceFullName)
Creates a UNO composite representing a UNO service with an interface inheritance.
|
static IUnoComposite |
createTypeFile(java.lang.String pFullName,
IUnoidlProject pProject)
Creates a file node from the fully qualified name of the type which should be described inside.
|
public static IUnoComposite createTypeFile(java.lang.String pFullName, IUnoidlProject pProject)
pFullName - is the fully qualified name of the type described in the file to create (eg:
org::libreoffice::foo)pProject - is the uno project in which to add the type.null if the fullName is null or an empty stringpublic static IUnoComposite createFile(org.eclipse.core.resources.IFile pFilehandle)
pFilehandle - the relative filenamefor file creation from Type namepublic static IUnoComposite createFileContent(java.lang.String pFullname)
The produced result will be of the following form:
#ifndef __define_name_idl__ #define __define_name_idl__ [...] #endif
pFullname - the type fully qualified name (eg: org::foo)public static IUnoComposite createInclude(java.lang.String pFullName)
If the method is called with the type foo::XFoo, the file foo/XFoo.idl will be
returned. The resulting include line is always in <, > characters.
pFullName - the fully qualified name of the type to includepublic static IUnoComposite createModuleDir(java.lang.String pFullName, IUnoidlProject pProject)
pFullName - is the fully qualified name of the module to create (eg: org::libreoffice::foo)pProject - is the unoidl project in which to generate the modulepublic static IUnoComposite createModuleSpace(java.lang.String pName)
For example, the produced text for the "foo" module name will be the following:
module foo { };
pName - is the module name (eg foo)public static IUnoComposite createModulesSpaces(java.lang.String pFullName)
createModuleSpace(String) to create cascading modules namespaces.pFullName - is the fully qualified name of the module to create (eg: org::libreoffice::foo)public static IUnoComposite createService(java.lang.String pName, boolean pIsPublished, java.lang.String pInterfaceFullName)
The text produced by this method corresponds to the following one
\n[published ]service NAME : INTERFACE {
[...]
};
pName - is the service namepIsPublished - true if the module is a published one.pInterfaceFullName - is the interface inheritance fully qualified nameto get all the module declarations,
for optional interface inheritance,
for a very basic service creation methodpublic static IUnoComposite createService(java.lang.String pName, boolean pIsPublished)
com::sun::star::uno::XInterface.
The text produced by this method corresponds to the following one
[published ]service NAME {
[...]
};
pName - is the service namepIsPublished - true if the module is a published one.to get all the module declarations,
for complex service creation method,
for a very basic service creation methodpublic static IUnoComposite createService(java.lang.String pName)
The text produced by this method corresponds to the following one
service NAME {
[...]
};
pName - is the service nameto get all the module declarations,
for complex service creation method,
for a basic service creation method that lets specify if th service is
published or not.public static IUnoComposite createInterface(java.lang.String pName, boolean pIsPublished, java.lang.String[] pParentIntfNames)
This method returns two kind of texts depending on the number of parent interfaces name in the array. The first writing is used when there is only one parent interface:
[published ]interface name [: parent::name ]{
[...]
};
The other way is used when there are more than one parent interfaces:
\n[published ]interface name {
[[optional] ]interface parent::name; // for each parent
[...]
};
pName - is the name of the interface (eg: foo)pIsPublished - true if the interface is publishedpParentIntfNames - array of all the mandatory parent interfacesfor the interfaces inheritances. This method should be called
for each new interface to add or for optional interfaces. It is used in this method thought.public static IUnoComposite createInterfaceInheritance(java.lang.String pName, boolean pOptional)
The generated text is formatted as following:
\t[[optional] ]interface inheritance::name;\n
pName - the fully qualified name of the interface to inherit frompOptional - true if the interface is optionalpublic static IUnoComposite createAttribute(java.lang.String pName, java.lang.String pType, java.lang.String pFlags)
pName - the attribute namepType - the type of the attributepFlags - the well-formatted string of flags.public static IUnoComposite createMethod(java.lang.String pName, java.lang.String pType)
pName - the method namepType - the method return typefor informations on how to add parameters to the methodpublic static IUnoComposite createMethodArgument(java.lang.String pName, java.lang.String pType, java.lang.String pDirection)
pName - the argument namepType - the argument typepDirection - the argument direction among in, out, inout.