LibreOffice Module codemaker (master) 1
|
#include <classfile.hxx>
Classes | |
class | Code |
Public Types | |
enum | AccessFlags { ACC_PUBLIC = 0x0001 , ACC_PRIVATE = 0x0002 , ACC_STATIC = 0x0008 , ACC_FINAL = 0x0010 , ACC_SUPER = 0x0020 , ACC_VARARGS = 0x0080 , ACC_INTERFACE = 0x0200 , ACC_ABSTRACT = 0x0400 , ACC_SYNTHETIC = 0x1000 } |
Public Member Functions | |
ClassFile (AccessFlags accessFlags, rtl::OString const &thisClass, rtl::OString const &superClass, rtl::OString const &signature) | |
~ClassFile () | |
std::unique_ptr< Code > | newCode () |
sal_uInt16 | addIntegerInfo (sal_Int32 value) |
sal_uInt16 | addFloatInfo (float value) |
sal_uInt16 | addLongInfo (sal_Int64 value) |
sal_uInt16 | addDoubleInfo (double value) |
void | addInterface (rtl::OString const &interface) |
void | addField (AccessFlags accessFlags, rtl::OString const &name, rtl::OString const &descriptor, sal_uInt16 constantValueIndex, rtl::OString const &signature) |
void | addMethod (AccessFlags accessFlags, rtl::OString const &name, rtl::OString const &descriptor, Code const *code, std::vector< rtl::OString > const &exceptions, rtl::OString const &signature) |
void | write (FileStream &file) const |
Private Types | |
typedef std::map< rtl::OString, sal_uInt16 > | Map |
Private Member Functions | |
ClassFile (ClassFile const &)=delete | |
ClassFile & | operator= (const ClassFile &)=delete |
sal_uInt16 | nextConstantPoolIndex (sal_uInt16 width) |
sal_uInt16 | addUtf8Info (rtl::OString const &value) |
sal_uInt16 | addClassInfo (rtl::OString const &type) |
sal_uInt16 | addStringInfo (rtl::OString const &value) |
sal_uInt16 | addFieldrefInfo (rtl::OString const &type, rtl::OString const &name, rtl::OString const &descriptor) |
sal_uInt16 | addMethodrefInfo (rtl::OString const &type, rtl::OString const &name, rtl::OString const &descriptor) |
sal_uInt16 | addInterfaceMethodrefInfo (rtl::OString const &type, rtl::OString const &name, rtl::OString const &descriptor) |
sal_uInt16 | addNameAndTypeInfo (rtl::OString const &name, rtl::OString const &descriptor) |
void | appendSignatureAttribute (std::vector< unsigned char > &stream, rtl::OString const &signature) |
Private Attributes | |
sal_uInt16 | m_constantPoolCount |
std::vector< unsigned char > | m_constantPool |
std::map< rtl::OString, sal_uInt16 > | m_utf8Infos |
std::map< sal_Int32, sal_uInt16 > | m_integerInfos |
std::map< sal_Int64, sal_uInt16 > | m_longInfos |
std::map< float, sal_uInt16 > | m_floatInfos |
std::map< double, sal_uInt16 > | m_doubleInfos |
std::map< sal_uInt16, sal_uInt16 > | m_classInfos |
std::map< sal_uInt16, sal_uInt16 > | m_stringInfos |
std::map< sal_uInt32, sal_uInt16 > | m_fieldrefInfos |
std::map< sal_uInt32, sal_uInt16 > | m_methodrefInfos |
std::map< sal_uInt32, sal_uInt16 > | m_interfaceMethodrefInfos |
std::map< sal_uInt32, sal_uInt16 > | m_nameAndTypeInfos |
AccessFlags | m_accessFlags |
sal_uInt16 | m_thisClass |
sal_uInt16 | m_superClass |
sal_uInt16 | m_interfacesCount |
std::vector< unsigned char > | m_interfaces |
sal_uInt16 | m_fieldsCount |
std::vector< unsigned char > | m_fields |
sal_uInt16 | m_methodsCount |
std::vector< unsigned char > | m_methods |
sal_uInt16 | m_attributesCount |
std::vector< unsigned char > | m_attributes |
Friends | |
class | Code |
Definition at line 34 of file classfile.hxx.
|
private |
Definition at line 181 of file classfile.hxx.
Enumerator | |
---|---|
ACC_PUBLIC | |
ACC_PRIVATE | |
ACC_STATIC | |
ACC_FINAL | |
ACC_SUPER | |
ACC_VARARGS | |
ACC_INTERFACE | |
ACC_ABSTRACT | |
ACC_SYNTHETIC |
Definition at line 36 of file classfile.hxx.
codemaker::javamaker::ClassFile::ClassFile | ( | AccessFlags | accessFlags, |
rtl::OString const & | thisClass, | ||
rtl::OString const & | superClass, | ||
rtl::OString const & | signature | ||
) |
ClassFile::~ClassFile | ( | ) |
Definition at line 480 of file classfile.cxx.
|
privatedelete |
|
private |
Definition at line 691 of file classfile.cxx.
References addUtf8Info(), i, index, m_classInfos, m_constantPool, nextConstantPoolIndex(), and type.
Referenced by addFieldrefInfo(), addInterface(), addInterfaceMethodrefInfo(), addMethod(), and addMethodrefInfo().
sal_uInt16 ClassFile::addDoubleInfo | ( | double | value | ) |
Definition at line 533 of file classfile.cxx.
References i, index, m_constantPool, m_doubleInfos, nextConstantPoolIndex(), and value.
void ClassFile::addField | ( | AccessFlags | accessFlags, |
rtl::OString const & | name, | ||
rtl::OString const & | descriptor, | ||
sal_uInt16 | constantValueIndex, | ||
rtl::OString const & | signature | ||
) |
Definition at line 558 of file classfile.cxx.
References addUtf8Info(), appendSignatureAttribute(), m_fields, m_fieldsCount, name, and SAL_MAX_UINT16.
|
private |
Definition at line 725 of file classfile.cxx.
References addClassInfo(), addNameAndTypeInfo(), i, index, m_constantPool, m_fieldrefInfos, name, nextConstantPoolIndex(), and type.
sal_uInt16 ClassFile::addFloatInfo | ( | float | value | ) |
Definition at line 501 of file classfile.cxx.
References i, index, m_constantPool, m_floatInfos, nextConstantPoolIndex(), and value.
sal_uInt16 ClassFile::addIntegerInfo | ( | sal_Int32 | value | ) |
Definition at line 486 of file classfile.cxx.
References i, index, m_constantPool, m_integerInfos, nextConstantPoolIndex(), and value.
void ClassFile::addInterface | ( | rtl::OString const & | interface | ) |
Definition at line 550 of file classfile.cxx.
References addClassInfo(), m_interfaces, m_interfacesCount, and SAL_MAX_UINT16.
|
private |
Definition at line 771 of file classfile.cxx.
References addClassInfo(), addNameAndTypeInfo(), i, index, m_constantPool, m_interfaceMethodrefInfos, name, nextConstantPoolIndex(), and type.
sal_uInt16 ClassFile::addLongInfo | ( | sal_Int64 | value | ) |
Definition at line 518 of file classfile.cxx.
References i, index, m_constantPool, m_longInfos, nextConstantPoolIndex(), and value.
void ClassFile::addMethod | ( | AccessFlags | accessFlags, |
rtl::OString const & | name, | ||
rtl::OString const & | descriptor, | ||
Code const * | code, | ||
std::vector< rtl::OString > const & | exceptions, | ||
rtl::OString const & | signature | ||
) |
Definition at line 582 of file classfile.cxx.
References addClassInfo(), addUtf8Info(), appendSignatureAttribute(), code, ex, m_methods, m_methodsCount, name, SAL_MAX_UINT16, and SAL_MAX_UINT32.
|
private |
Definition at line 748 of file classfile.cxx.
References addClassInfo(), addNameAndTypeInfo(), i, index, m_constantPool, m_methodrefInfos, name, nextConstantPoolIndex(), and type.
|
private |
Definition at line 795 of file classfile.cxx.
References addUtf8Info(), i, index, m_constantPool, m_nameAndTypeInfos, name, and nextConstantPoolIndex().
Referenced by addFieldrefInfo(), addInterfaceMethodrefInfo(), and addMethodrefInfo().
|
private |
Definition at line 708 of file classfile.cxx.
References addUtf8Info(), i, index, m_constantPool, m_stringInfos, nextConstantPoolIndex(), and value.
|
private |
Definition at line 670 of file classfile.cxx.
References i, index, m_constantPool, m_utf8Infos, nextConstantPoolIndex(), SAL_MAX_UINT16, and value.
Referenced by addClassInfo(), addField(), addMethod(), addNameAndTypeInfo(), addStringInfo(), and appendSignatureAttribute().
|
private |
Definition at line 818 of file classfile.cxx.
References addUtf8Info(), and stream.
Referenced by addField(), and addMethod().
std::unique_ptr< ClassFile::Code > ClassFile::newCode | ( | ) |
Definition at line 482 of file classfile.cxx.
References Code.
|
private |
Definition at line 660 of file classfile.cxx.
References index, m_constantPoolCount, and SAL_MAX_UINT16.
Referenced by addClassInfo(), addDoubleInfo(), addFieldrefInfo(), addFloatInfo(), addIntegerInfo(), addInterfaceMethodrefInfo(), addLongInfo(), addMethodrefInfo(), addNameAndTypeInfo(), addStringInfo(), and addUtf8Info().
void ClassFile::write | ( | FileStream & | file | ) | const |
Definition at line 641 of file classfile.cxx.
References m_accessFlags, m_attributes, m_attributesCount, m_constantPool, m_constantPoolCount, m_fields, m_fieldsCount, m_interfaces, m_interfacesCount, m_methods, m_methodsCount, m_superClass, and m_thisClass.
|
friend |
Definition at line 234 of file classfile.hxx.
Referenced by newCode().
|
private |
Definition at line 222 of file classfile.hxx.
Referenced by write().
|
private |
Definition at line 232 of file classfile.hxx.
Referenced by write().
|
private |
Definition at line 231 of file classfile.hxx.
Referenced by write().
|
private |
Definition at line 216 of file classfile.hxx.
Referenced by addClassInfo().
|
private |
Definition at line 210 of file classfile.hxx.
Referenced by addClassInfo(), addDoubleInfo(), addFieldrefInfo(), addFloatInfo(), addIntegerInfo(), addInterfaceMethodrefInfo(), addLongInfo(), addMethodrefInfo(), addNameAndTypeInfo(), addStringInfo(), addUtf8Info(), and write().
|
private |
Definition at line 209 of file classfile.hxx.
Referenced by nextConstantPoolIndex(), and write().
|
private |
Definition at line 215 of file classfile.hxx.
Referenced by addDoubleInfo().
|
private |
Definition at line 218 of file classfile.hxx.
Referenced by addFieldrefInfo().
|
private |
Definition at line 228 of file classfile.hxx.
Referenced by addField(), and write().
|
private |
Definition at line 227 of file classfile.hxx.
Referenced by addField(), and write().
|
private |
Definition at line 214 of file classfile.hxx.
Referenced by addFloatInfo().
|
private |
Definition at line 212 of file classfile.hxx.
Referenced by addIntegerInfo().
|
private |
Definition at line 220 of file classfile.hxx.
Referenced by addInterfaceMethodrefInfo().
|
private |
Definition at line 226 of file classfile.hxx.
Referenced by addInterface(), and write().
|
private |
Definition at line 225 of file classfile.hxx.
Referenced by addInterface(), and write().
|
private |
Definition at line 213 of file classfile.hxx.
Referenced by addLongInfo().
|
private |
Definition at line 219 of file classfile.hxx.
Referenced by addMethodrefInfo().
|
private |
Definition at line 230 of file classfile.hxx.
Referenced by addMethod(), and write().
|
private |
Definition at line 229 of file classfile.hxx.
Referenced by addMethod(), and write().
|
private |
Definition at line 221 of file classfile.hxx.
Referenced by addNameAndTypeInfo().
|
private |
Definition at line 217 of file classfile.hxx.
Referenced by addStringInfo().
|
private |
Definition at line 224 of file classfile.hxx.
Referenced by write().
|
private |
Definition at line 223 of file classfile.hxx.
Referenced by write().
|
private |
Definition at line 211 of file classfile.hxx.
Referenced by addUtf8Info().