Class TlbBase
- java.lang.Object
-
- com.sun.jna.platform.win32.COM.tlb.imp.TlbBase
-
- Direct Known Subclasses:
TlbAbstractMethod
,TlbCoClass
,TlbDispInterface
,TlbEnum
,TlbInterface
public abstract class TlbBase extends Object
The Class TlbBase.- Author:
- Tobias Wolf, wolf.tobias@gmx.net
-
-
Field Summary
Fields Modifier and Type Field Description protected String
bindingMode
protected StringBuffer
classBuffer
The class buffer.protected String
content
The content.static String
CR
The Constant CR.static String
CRCR
The Constant CRCR.protected String
filename
static String[]
IDISPATCH_METHODS
The idispatch methods.protected int
index
The index.static String[]
IUNKNOWN_METHODS
The iunknown methods.protected String
name
static String
TAB
The Constant TAB.static String
TABTAB
The Constant TABTAB.protected StringBuffer
templateBuffer
The template buffer.protected TypeInfoUtil
typeInfoUtil
protected TypeLibUtil
typeLibUtil
The type lib util.
-
Constructor Summary
Constructors Constructor Description TlbBase(int index, TypeLibUtil typeLibUtil, TypeInfoUtil typeInfoUtil)
TlbBase(int index, TypeLibUtil typeLibUtil, TypeInfoUtil typeInfoUtil, String bindingMode)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
createClassName(String name)
Creates the class name.void
createContent(String content)
Creates the content.protected void
createPackageName(String packagename)
StringBuffer
getClassBuffer()
Gets the class buffer.protected abstract String
getClassTemplate()
Gets the class template.String
getFilename()
String
getName()
protected boolean
isDispIdMode()
protected boolean
isReservedMethod(String method)
Checks if is reserved method.protected boolean
isVTableMode()
protected void
log(String level, String msg)
Log.void
logError(String msg)
Log error.void
logInfo(String msg)
Log info.protected void
readTemplateFile(String filename)
Read template file.protected void
replaceVariable(String name, String value)
Replace variable.void
setFilename(String filename)
void
setName(String name)
-
-
-
Field Detail
-
CR
public static final String CR
The Constant CR.- See Also:
- Constant Field Values
-
CRCR
public static final String CRCR
The Constant CRCR.- See Also:
- Constant Field Values
-
TAB
public static final String TAB
The Constant TAB.- See Also:
- Constant Field Values
-
TABTAB
public static final String TABTAB
The Constant TABTAB.- See Also:
- Constant Field Values
-
typeLibUtil
protected TypeLibUtil typeLibUtil
The type lib util.
-
typeInfoUtil
protected TypeInfoUtil typeInfoUtil
-
index
protected int index
The index.
-
templateBuffer
protected StringBuffer templateBuffer
The template buffer.
-
classBuffer
protected StringBuffer classBuffer
The class buffer.
-
content
protected String content
The content.
-
filename
protected String filename
-
name
protected String name
-
IUNKNOWN_METHODS
public static String[] IUNKNOWN_METHODS
The iunknown methods.
-
IDISPATCH_METHODS
public static String[] IDISPATCH_METHODS
The idispatch methods.
-
bindingMode
protected String bindingMode
-
-
Constructor Detail
-
TlbBase
public TlbBase(int index, TypeLibUtil typeLibUtil, TypeInfoUtil typeInfoUtil)
-
TlbBase
public TlbBase(int index, TypeLibUtil typeLibUtil, TypeInfoUtil typeInfoUtil, String bindingMode)
-
-
Method Detail
-
logError
public void logError(String msg)
Log error.- Parameters:
msg
- the msg
-
logInfo
public void logInfo(String msg)
Log info.- Parameters:
msg
- the msg
-
getClassBuffer
public StringBuffer getClassBuffer()
Gets the class buffer.- Returns:
- the class buffer
-
createContent
public void createContent(String content)
Creates the content.- Parameters:
content
- the content
-
setFilename
public void setFilename(String filename)
-
getFilename
public String getFilename()
-
getName
public String getName()
-
setName
public void setName(String name)
-
getClassTemplate
protected abstract String getClassTemplate()
Gets the class template.- Returns:
- the class template
-
readTemplateFile
protected void readTemplateFile(String filename) throws IOException
Read template file.- Parameters:
filename
- the filename- Throws:
IOException
- Signals that an I/O exception has occurred.
-
replaceVariable
protected void replaceVariable(String name, String value)
Replace variable.- Parameters:
name
- the namevalue
- the value
-
createPackageName
protected void createPackageName(String packagename)
-
createClassName
protected void createClassName(String name)
Creates the class name.- Parameters:
name
- the name
-
isReservedMethod
protected boolean isReservedMethod(String method)
Checks if is reserved method.- Parameters:
method
- the method- Returns:
- true, if is reserved method
-
isVTableMode
protected boolean isVTableMode()
-
isDispIdMode
protected boolean isDispIdMode()
-
-