You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/11/05 21:04:42 UTC
svn commit: r1539116 - in
/subversion/trunk/subversion/bindings/javahl/native:
SubversionException.cpp SubversionException.hpp
jniwrapper/jni_class_cache.cpp
Author: brane
Date: Tue Nov 5 20:04:41 2013
New Revision: 1539116
URL: http://svn.apache.org/r1539116
Log:
Add a new-style, cached wrapper for the SubversionException class to JavaHL.'
* subversion/bindings/javahl/native/SubversionException.hpp,
subversion/bindings/javahl/native/SubversionException.cpp: New files.
* subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp
(Java::ClassCache::ClassCache): Add initializer for the
SubversionException generator class.
Added:
subversion/trunk/subversion/bindings/javahl/native/SubversionException.cpp (with props)
subversion/trunk/subversion/bindings/javahl/native/SubversionException.hpp (with props)
Modified:
subversion/trunk/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp
Added: subversion/trunk/subversion/bindings/javahl/native/SubversionException.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SubversionException.cpp?rev=1539116&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SubversionException.cpp (added)
+++ subversion/trunk/subversion/bindings/javahl/native/SubversionException.cpp Tue Nov 5 20:04:41 2013
@@ -0,0 +1,32 @@
+/**
+ * @copyright
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+#include "SubversionException.hpp"
+#include "JNIUtil.h"
+
+namespace JavaHL {
+
+const char* const SubversionException::m_class_name =
+ JAVA_PACKAGE"/SubversionException";
+
+} // namespace JavaHL
Propchange: subversion/trunk/subversion/bindings/javahl/native/SubversionException.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: subversion/trunk/subversion/bindings/javahl/native/SubversionException.hpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SubversionException.hpp?rev=1539116&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SubversionException.hpp (added)
+++ subversion/trunk/subversion/bindings/javahl/native/SubversionException.hpp Tue Nov 5 20:04:41 2013
@@ -0,0 +1,54 @@
+/**
+ * @copyright
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+#ifndef SVN_JAVAHL_SUBVERSION_EXCEPTION_HPP
+#define SVN_JAVAHL_SUBVERSION_EXCEPTION_HPP
+
+#include "jniwrapper/jni_exception.hpp"
+
+namespace JavaHL {
+
+/**
+ * Generator class for exceptions of type
+ * @c org.apache.subversion.javahl.SubversionException.
+ *
+ * The associated JNI class reference is stored for the lifetime of
+ * the JVM in the global class cache.
+ *
+ * @since New in 1.9.
+ */
+class SubversionException : public ::Java::Exception
+{
+public:
+ explicit SubversionException(::Java::Env env)
+ : Java::Exception(env, ::Java::ClassCache::get_subversion_exception())
+ {}
+
+private:
+ friend class ::Java::ClassCache;
+ static const char* const m_class_name;
+};
+
+} // namespace JavaHL
+
+#endif // SVN_JAVAHL_SUBVERSION_EXCEPTION_HPP
Propchange: subversion/trunk/subversion/bindings/javahl/native/SubversionException.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/trunk/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp?rev=1539116&r1=1539115&r2=1539116&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp Tue Nov 5 20:04:41 2013
@@ -40,13 +40,17 @@ ClassCache::ClassCache(Env env)
: SVN_JAVAHL_JNIWRAPPER_CLASS_CACHE_INIT(object, Object),
SVN_JAVAHL_JNIWRAPPER_CLASS_CACHE_INIT(classtype, Class),
SVN_JAVAHL_JNIWRAPPER_CLASS_CACHE_INIT(throwable, Exception),
- SVN_JAVAHL_JNIWRAPPER_CLASS_CACHE_INIT(string, String)
+ SVN_JAVAHL_JNIWRAPPER_CLASS_CACHE_INIT(string, String),
+
+ SVN_JAVAHL_JNIWRAPPER_CLASS_CACHE_INIT(subversion_exception,
+ ::JavaHL::SubversionException)
{
m_instance = this;
// no-op: Object::static_init(env);
Class::static_init(env);
Exception::static_init(env);
String::static_init(env);
+ // no-op: ::JavaHL::SubversionException::static_init(env);
}
#undef SVN_JAVAHL_JNIWRAPPER_CLASS_CACHE_INIT