12#ifndef JAVACLASSDESCRIPTOR_H
13#define JAVACLASSDESCRIPTOR_H
23 const char* what()
const throw() {
return "Invalid java signature";}
29 template <>
struct Descriptor<void> {
static std::string d() {
return "V";}};
30 template <>
struct Descriptor<bool> {
static std::string d() {
return "Z";}};
31 template <>
struct Descriptor<signed char> {
static std::string d() {
return "C";}};
32 template <>
struct Descriptor<unsigned char> {
static std::string d() {
return "C";}};
33 template <>
struct Descriptor<short> {
static std::string d() {
return "S";}};
34 template <>
struct Descriptor<unsigned short> {
static std::string d() {
return "S";}};
35 template <>
struct Descriptor<int> {
static std::string d() {
return "I";}};
36 template <>
struct Descriptor<unsigned int> {
static std::string d() {
return "I";}};
37 template <>
struct Descriptor<long> {
static std::string d() {
38 if (
sizeof(
long)==
sizeof(
int))
return "I";
40 template <>
struct Descriptor<unsigned long> {
static std::string d() {
41 if (
sizeof(
long)==
sizeof(
int))
return "I";
44 template <>
struct Descriptor<long long> {
static std::string d() {
return "J";}};
45 template <>
struct Descriptor<unsigned long long> {
static std::string d() {
return "J";}};
47 template <>
struct Descriptor<float> {
static std::string d() {
return "F";}};
48 template <>
struct Descriptor<double> {
static std::string d() {
return "D";}};
50 template <>
struct Descriptor<
std::string> {
static std::string d() {
return "Ljava/lang/String;";}};
61 template <
class F,
int i>
struct arg_desc;
70 static std::string d() {
return std::string();}
73 template <
class F,
int i>
76 static std::string d() {
87 typename enable_if<functional::is_function<M>, std::string>::T
88 descriptor(dummy<0> d=0)
90 return std::string(
"(") + arg_desc<M, functional::Arity<M>::V>::d() +
91 ")" + Descriptor<typename functional::Return<M>::T>::d();
Metaprogramming support for processing functions of multiple arguments.
Contains definitions related to classdesc functionality.
std::string arg_description(F f)
Return a concatenated string of argument descriptors.
Definition javaClassDescriptor.h:83
Descriptor object.
Definition javaClassDescriptor.h:27
Definition javaClassDescriptor.h:75
Definition classdesc.h:299
controlled template specialisation: stolen from boost::enable_if.
Definition classdesc.h:282
Definition javaClassDescriptor.h:22