dataMetaDom 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dataMetaDom.rb +1 -1
- data/lib/dataMetaDom/enum.rb +2 -2
- data/lib/dataMetaDom/field.rb +1 -1
- data/lib/dataMetaDom/pojo.rb +3 -3
- data/lib/dataMetaDom/record.rb +4 -2
- data/lib/dataMetaDom/util.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2578257bdf5a67a2a4c25cfec42f5229900f07d6
|
4
|
+
data.tar.gz: e2c063e1d81b3e4eba2738559f23400857d5a0e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 924717e61de5af7360386aebfc6146224217bb63f73f5d4f1300bf45a9e4dcfee84eebc8a474d40b3f0b903568ef2545dce306ad46042e23dc0689251e836c0f
|
7
|
+
data.tar.gz: 0362a4721f67d263a3de838470a438fd6d1c4d7ef066f5666d837d14f807e92058108da778d35c1057d0820e359d0b1e63a70e0e16a75fbc2f4b86a698a820b3
|
data/lib/dataMetaDom.rb
CHANGED
@@ -25,7 +25,7 @@ For command line details either check the new method's source or the README.rdoc
|
|
25
25
|
module DataMetaDom
|
26
26
|
|
27
27
|
# Current version
|
28
|
-
VERSION = '1.0.
|
28
|
+
VERSION = '1.0.1'
|
29
29
|
|
30
30
|
=begin rdoc
|
31
31
|
Quick and dirty turning a Windows path into a path of the platform on which this script is running.
|
data/lib/dataMetaDom/enum.rb
CHANGED
@@ -22,8 +22,8 @@ Attempts to consume/parse an enum from the given source on the given model, retu
|
|
22
22
|
* src - an instance of SourceFile
|
23
23
|
=end
|
24
24
|
def self.consumed?(model, src)
|
25
|
-
src.line =~ /^\s*#{ENUM}\s+(\w+)$/ ? model.addEnum(Enum.new(combineNsBase(
|
26
|
-
nsAdjustment(src.namespace, model.options, src), $1)).parse(src)) : nil
|
25
|
+
src.line =~ /^\s*#{ENUM}\s+(\w+)$/ ? model.addEnum(Enum.new(DataMetaDom.combineNsBase(
|
26
|
+
DataMetaDom.nsAdjustment(src.namespace, model.options, src), $1)).parse(src)) : nil
|
27
27
|
end
|
28
28
|
|
29
29
|
=begin rdoc
|
data/lib/dataMetaDom/field.rb
CHANGED
@@ -129,7 +129,7 @@ Parses this field from the given source.
|
|
129
129
|
@trgType = DataType.parse(source, trgSpec)
|
130
130
|
unless STANDARD_TYPES.member?(@trgType.type)
|
131
131
|
ns, base = DataMetaDom.splitNameSpace(@trgType.type)
|
132
|
-
newNs = nsAdjustment(ns, model.options, source)
|
132
|
+
newNs = DataMetaDom.nsAdjustment(ns, model.options, source)
|
133
133
|
newNsVer = "#{newNs}.#{base}".to_sym
|
134
134
|
@trgType.type = newNsVer # adjust the type for the map target type too
|
135
135
|
end
|
data/lib/dataMetaDom/pojo.rb
CHANGED
@@ -197,7 +197,7 @@ Maximum size of a Mapping (Map), rather aribtrary choice, not backed by any big
|
|
197
197
|
k = rawType.to_sym
|
198
198
|
srcType = PRIMS_TO_WRAP.has_key?(k) ? PRIMS_TO_WRAP[k] : rawType
|
199
199
|
typeRenderer = JAVA_TYPES[trg.type]
|
200
|
-
rawTrg = typeRenderer ? typeRenderer.call(trg) : condenseType(trg.type, javaPackage)
|
200
|
+
rawTrg = typeRenderer ? typeRenderer.call(trg) : DataMetaDom.condenseType(trg.type, javaPackage)
|
201
201
|
k = rawTrg.to_sym
|
202
202
|
trgType = PRIMS_TO_WRAP.has_key?(k) ? PRIMS_TO_WRAP[k] : rawTrg
|
203
203
|
"Map<#{srcType}, #{trgType}>"
|
@@ -449,7 +449,7 @@ FIELD_JAVADOC
|
|
449
449
|
# Unaggregated Java type
|
450
450
|
def unaggrJavaType(dt, javaPackage)
|
451
451
|
typeRenderer = JAVA_TYPES[dt.type]
|
452
|
-
typeRenderer ? typeRenderer.call(dt) : condenseType(dt.type, javaPackage)
|
452
|
+
typeRenderer ? typeRenderer.call(dt) : DataMetaDom.condenseType(dt.type, javaPackage)
|
453
453
|
end
|
454
454
|
|
455
455
|
# aggregated Java type
|
@@ -478,7 +478,7 @@ All aggregation specifics are hhandled elsewhere (see genDataMetaSame)
|
|
478
478
|
# the name of the DataMetaSame implementor of the Field's type, assuming it is available during compile time
|
479
479
|
ftLsClassBase = "#{ftClassBase}#{suffix}"
|
480
480
|
# import the class if it belogns to a different package
|
481
|
-
imports << "#{combineNsBase(ftNs, ftLsClassBase)}" unless javaPackage == ftNs
|
481
|
+
imports << "#{DataMetaDom.combineNsBase(ftNs, ftLsClassBase)}" unless javaPackage == ftNs
|
482
482
|
%Q<#{ftLsClassBase}.I.isSame(#{one}, #{another})>
|
483
483
|
|
484
484
|
when (f.isRequired && PRIMITIVABLE_TYPES.member?(dt.type)) || (enumType && enumType.kind_of?(DataMetaDom::Enum))
|
data/lib/dataMetaDom/record.rb
CHANGED
@@ -102,7 +102,8 @@ Attempts to consume the instance from the given source, returns it if successful
|
|
102
102
|
* +src+ - an instance of SourceFile
|
103
103
|
=end
|
104
104
|
def self.consumed?(model, src)
|
105
|
-
src.line =~ /^\s*#{BITSET}\s+(\w+)\s+.+$/ ? model.addEnum(BitSet.new(
|
105
|
+
src.line =~ /^\s*#{BITSET}\s+(\w+)\s+.+$/ ? model.addEnum(BitSet.new(DataMetaDom.combineNsBase(
|
106
|
+
DataMetaDom.nsAdjustment(src.namespace, model.options, src), $1)).parse(src)) : nil
|
106
107
|
end
|
107
108
|
|
108
109
|
=begin rdoc
|
@@ -136,7 +137,8 @@ Attempts to consume the instance from the given source, returns it if successful
|
|
136
137
|
* +src+ - an instance of SourceFile
|
137
138
|
=end
|
138
139
|
def self.consumed?(model, src)
|
139
|
-
src.line =~ /^\s*#{MAPPING}\s+(\w+)\s+.+$/ ? model.addEnum(Mappings.new(
|
140
|
+
src.line =~ /^\s*#{MAPPING}\s+(\w+)\s+.+$/ ? model.addEnum(Mappings.new(DataMetaDom.combineNsBase(
|
141
|
+
DataMetaDom.nsAdjustment(src.namespace, model.options, src), $1)).parse(src)) : nil
|
140
142
|
end
|
141
143
|
|
142
144
|
=begin rdoc
|
data/lib/dataMetaDom/util.rb
CHANGED