Class: JAXB2Ruby::Converter
- Inherits:
-
Object
- Object
- JAXB2Ruby::Converter
- Defined in:
- lib/jaxb2ruby/converter.rb
Overview
:nodoc:
Constant Summary collapse
- XML_NULL =
"\u0000"- XML_ANNOT_DEFAULT =
"##default"
Class Method Summary collapse
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(schema, options = {}) ⇒ Converter
constructor
A new instance of Converter.
Constructor Details
#initialize(schema, options = {}) ⇒ Converter
Returns a new instance of Converter.
17 18 19 20 21 22 23 24 25 |
# File 'lib/jaxb2ruby/converter.rb', line 17 def initialize(schema, = {}) raise ArgumentError, "cannot access schema: #{schema}" unless File.file?(schema) and File.readable?(schema) @xjc = XJC.new(schema, :xjc => [:xjc], :wsdl => !![:wsdl], :jvm => [:jvm], bindings: [:bindings]) @namespace = [:namespace] || {} raise ArgumentError, "namespace mapping must be a Hash" unless @namespace.is_a?(Hash) @typemap = TypeUtil.new([:typemap]) end |
Class Method Details
.convert(schema, options = {}) ⇒ Object
13 14 15 |
# File 'lib/jaxb2ruby/converter.rb', line 13 def self.convert(schema, = {}) new(schema, ).convert end |
Instance Method Details
#convert ⇒ Object
27 28 29 30 |
# File 'lib/jaxb2ruby/converter.rb', line 27 def convert create_java_classes create_ruby_classes end |