Java: no namespace indent
This commit is contained in:
parent
a52ce7bb7b
commit
f58c14a74a
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 Max Kellermann <max.kellermann@gmail.com>
|
* Copyright 2010-2021 Max Kellermann <max.kellermann@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -36,6 +36,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace Java {
|
namespace Java {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for a local "jclass" reference.
|
* Wrapper for a local "jclass" reference.
|
||||||
*/
|
*/
|
||||||
@ -77,6 +78,7 @@ namespace Java {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
} // namespace Java
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2019 Max Kellermann <max.kellermann@gmail.com>
|
* Copyright 2010-2021 Max Kellermann <max.kellermann@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2019 Max Kellermann <max.kellermann@gmail.com>
|
* Copyright 2010-2021 Max Kellermann <max.kellermann@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -35,6 +35,7 @@
|
|||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
|
|
||||||
namespace Java {
|
namespace Java {
|
||||||
|
|
||||||
class Exception : public std::runtime_error {
|
class Exception : public std::runtime_error {
|
||||||
public:
|
public:
|
||||||
explicit Exception(JNIEnv *env, jthrowable e) noexcept;
|
explicit Exception(JNIEnv *env, jthrowable e) noexcept;
|
||||||
@ -57,6 +58,7 @@ namespace Java {
|
|||||||
env->ExceptionClear();
|
env->ExceptionClear();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
} // namespace Java
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 Max Kellermann <max.kellermann@gmail.com>
|
* Copyright 2010-2021 Max Kellermann <max.kellermann@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -37,6 +37,7 @@
|
|||||||
class AllocatedPath;
|
class AllocatedPath;
|
||||||
|
|
||||||
namespace Java {
|
namespace Java {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for a java.io.File object.
|
* Wrapper for a java.io.File object.
|
||||||
*/
|
*/
|
||||||
@ -61,6 +62,7 @@ namespace Java {
|
|||||||
static AllocatedPath ToAbsolutePath(JNIEnv *env,
|
static AllocatedPath ToAbsolutePath(JNIEnv *env,
|
||||||
jobject file) noexcept;
|
jobject file) noexcept;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
} // namespace Java
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 Max Kellermann <max.kellermann@gmail.com>
|
* Copyright 2010-2021 Max Kellermann <max.kellermann@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -30,10 +30,12 @@
|
|||||||
#include "Global.hxx"
|
#include "Global.hxx"
|
||||||
|
|
||||||
namespace Java {
|
namespace Java {
|
||||||
|
|
||||||
JavaVM *jvm;
|
JavaVM *jvm;
|
||||||
|
|
||||||
void Init(JNIEnv *env) noexcept
|
void Init(JNIEnv *env) noexcept
|
||||||
{
|
{
|
||||||
env->GetJavaVM(&jvm);
|
env->GetJavaVM(&jvm);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
} // namespace Java
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 Max Kellermann <max.kellermann@gmail.com>
|
* Copyright 2010-2021 Max Kellermann <max.kellermann@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -35,6 +35,7 @@
|
|||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
|
|
||||||
namespace Java {
|
namespace Java {
|
||||||
|
|
||||||
extern JavaVM *jvm;
|
extern JavaVM *jvm;
|
||||||
|
|
||||||
void Init(JNIEnv *env) noexcept;
|
void Init(JNIEnv *env) noexcept;
|
||||||
@ -53,6 +54,7 @@ namespace Java {
|
|||||||
jvm->AttachCurrentThread(&env, nullptr);
|
jvm->AttachCurrentThread(&env, nullptr);
|
||||||
return env;
|
return env;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
} // namespace Java
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2019 Max Kellermann <max.kellermann@gmail.com>
|
* Copyright 2010-2021 Max Kellermann <max.kellermann@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -37,6 +37,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace Java {
|
namespace Java {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for a local "jobject" reference.
|
* Wrapper for a local "jobject" reference.
|
||||||
*/
|
*/
|
||||||
@ -71,6 +72,7 @@ namespace Java {
|
|||||||
return (jstring)env->CallObjectMethod(o, toString_method);
|
return (jstring)env->CallObjectMethod(o, toString_method);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
} // namespace Java
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 Max Kellermann <max.kellermann@gmail.com>
|
* Copyright 2010-2021 Max Kellermann <max.kellermann@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -38,6 +38,7 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace Java {
|
namespace Java {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hold a local reference on a JNI object.
|
* Hold a local reference on a JNI object.
|
||||||
*/
|
*/
|
||||||
@ -202,6 +203,7 @@ namespace Java {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
} // namespace Java
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2019 Max Kellermann <max.kellermann@gmail.com>
|
* Copyright 2010-2021 Max Kellermann <max.kellermann@gmail.com>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -38,6 +38,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Java {
|
namespace Java {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for a local "jstring" reference.
|
* Wrapper for a local "jstring" reference.
|
||||||
*/
|
*/
|
||||||
@ -77,6 +78,7 @@ namespace Java {
|
|||||||
return ToString(GetEnv(), Get());
|
return ToString(GetEnv(), Get());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
} // namespace Java
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user