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 StringbindingModeprotected StringBufferclassBufferThe class buffer.protected StringcontentThe content.static StringCRThe Constant CR.static StringCRCRThe Constant CRCR.protected Stringfilenamestatic String[]IDISPATCH_METHODSThe idispatch methods.protected intindexThe index.static String[]IUNKNOWN_METHODSThe iunknown methods.protected Stringnamestatic StringTABThe Constant TAB.static StringTABTABThe Constant TABTAB.protected StringBuffertemplateBufferThe template buffer.protected TypeInfoUtiltypeInfoUtilprotected TypeLibUtiltypeLibUtilThe 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 voidcreateClassName(String name)Creates the class name.voidcreateContent(String content)Creates the content.protected voidcreatePackageName(String packagename)StringBuffergetClassBuffer()Gets the class buffer.protected abstract StringgetClassTemplate()Gets the class template.StringgetFilename()StringgetName()protected booleanisDispIdMode()protected booleanisReservedMethod(String method)Checks if is reserved method.protected booleanisVTableMode()protected voidlog(String level, String msg)Log.voidlogError(String msg)Log error.voidlogInfo(String msg)Log info.protected voidreadTemplateFile(String filename)Read template file.protected voidreplaceVariable(String name, String value)Replace variable.voidsetFilename(String filename)voidsetName(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()
-
-