summaryrefslogtreecommitdiff
path: root/src/json/ext/ParserService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/json/ext/ParserService.java')
-rw-r--r--src/json/ext/ParserService.java34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/json/ext/ParserService.java b/src/json/ext/ParserService.java
deleted file mode 100644
index e0805a7..0000000
--- a/src/json/ext/ParserService.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This code is copyrighted work by Daniel Luz <dev at mernen dot com>.
- *
- * Distributed under the Ruby and GPLv2 licenses; see COPYING and GPL files
- * for details.
- */
-package json.ext;
-
-import java.io.IOException;
-
-import org.jruby.Ruby;
-import org.jruby.RubyClass;
-import org.jruby.RubyModule;
-import org.jruby.runtime.load.BasicLibraryService;
-
-/**
- * The service invoked by JRuby's {@link org.jruby.runtime.load.LoadService LoadService}.
- * Defines the <code>JSON::Ext::Parser</code> class.
- * @author mernen
- */
-public class ParserService implements BasicLibraryService {
- public boolean basicLoad(Ruby runtime) throws IOException {
- runtime.getLoadService().require("json/common");
- RuntimeInfo info = RuntimeInfo.initRuntime(runtime);
-
- info.jsonModule = runtime.defineModule("JSON");
- RubyModule jsonExtModule = info.jsonModule.defineModuleUnder("Ext");
- RubyClass parserClass =
- jsonExtModule.defineClassUnder("Parser", runtime.getObject(),
- Parser.ALLOCATOR);
- parserClass.defineAnnotatedMethods(Parser.class);
- return true;
- }
-}