File | Line |
---|
com\legstar\coxb\convert\simple\CobolZonedDecimalSimpleConverter.java | 103 |
com\legstar\coxb\convert\simple\CobolZonedDecimalSimpleConverterNoCodePage.java | 126 |
newOffset, getCobolContext().getHostIntegerSigns());
ce.setBigDecimalValue(javaDecimal);
newOffset += ce.getByteLength();
} catch (CobolConversionException e) {
throwHostException(ce, e);
}
return newOffset;
}
/** {@inheritDoc} */
public int fromHost(final ICobolArrayZonedDecimalBinding ce,
final byte[] hostSource, final int offset, final int currentOccurs)
throws HostException {
List < BigDecimal > lArray = new ArrayList < BigDecimal >();
int newOffset = offset;
try {
for (int i = 0; i < currentOccurs; i++) {
BigDecimal javaDecimal = fromHostSingle(ce.getItemByteLength(),
ce.getTotalDigits(), ce.getFractionDigits(),
ce.isSigned(), ce.isSignSeparate(), ce.isSignLeading(),
hostSource, newOffset, getCobolContext() |
File | Line |
---|
com\legstar\coxb\convert\simple\CobolDbcsSimpleConverter.java | 124 |
com\legstar\coxb\convert\simple\CobolStringSimpleConverter.java | 108 |
final ICobolArrayDbcsBinding ce,
final byte[] hostSource,
final int offset,
final int currentOccurs)
throws HostException {
List < String > lArray = new ArrayList < String >();
int newOffset = offset;
try {
for (int i = 0; i < currentOccurs; i++) {
String javaString = fromHostSingle(
getCobolContext().getHostCharsetName(),
ce.getItemByteLength(),
hostSource,
newOffset);
lArray.add(javaString);
newOffset += ce.getItemByteLength();
}
ce.setStringList(lArray);
} catch (CobolConversionException e) {
throwHostException(ce, e);
}
return newOffset;
}
/**
* Converts a Java String to a host character stream within the host
* character set.
*
* @param javaString java string to convert
* @param hostCharsetName host character set
* @param cobolByteLength host byte length
* @param isJustifiedRight is Cobol data right justified
* @param hostTarget target host buffer
* @param offset offset in target host buffer
* @return offset after host buffer is updated
* @throws CobolConversionException if conversion fails
*/
public static final int toHostSingle(
final String javaString,
final String hostCharsetName,
final int cobolByteLength, |
File | Line |
---|
com\legstar\coxb\convert\simple\CobolZonedDecimalSimpleConverter.java | 61 |
com\legstar\coxb\convert\simple\CobolZonedDecimalSimpleConverterNoCodePage.java | 65 |
.getHostIntegerSigns());
} catch (CobolConversionException e) {
throwHostException(ce, e);
}
return newOffset;
}
/** {@inheritDoc} */
public int toHost(final ICobolArrayZonedDecimalBinding ce,
final byte[] hostTarget, final int offset, final int currentOccurs)
throws HostException {
int newOffset = offset;
try {
for (BigDecimal javaSource : ce.getBigDecimalList()) {
newOffset = toHostSingle(javaSource, ce.getItemByteLength(),
ce.getTotalDigits(), ce.getFractionDigits(),
ce.isSigned(), ce.isSignSeparate(), ce.isSignLeading(),
hostTarget, newOffset, getCobolContext() |
File | Line |
---|
com\legstar\coxb\impl\CArrayDoubleBinding.java | 106 |
com\legstar\coxb\impl\CArrayFloatBinding.java | 105 |
if (type.equals(Double.class)) {
return mList;
} else if (type.equals(BigDecimal.class)) {
return getBigDecimalList();
} else {
throw new HostException("Attempt to get binding " + getBindingName()
+ " as an incompatible type " + type);
}
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
public void setObjectValue(final Object value) throws HostException {
if (value == null) {
mList = null;
return;
}
if (value instanceof List) {
if (((List < ? >) value).size() == 0) {
mList = new ArrayList < Double >(); |
File | Line |
---|
com\legstar\coxb\impl\reflect\ReflectHostToJavaTransformer.java | 41 |
com\legstar\coxb\impl\reflect\ReflectJavaToHostTransformer.java | 41 |
public ReflectHostToJavaTransformer(
final String jaxbPackageName,
final String jaxbType) throws ReflectBindingException {
try {
_jaxbElementDescriptor = new JAXBElementDescriptor(jaxbPackageName,
jaxbType);
} catch (JAXBAnnotationException e) {
throw new ReflectBindingException(e);
}
}
/** {@inheritDoc} */
public ICobolComplexBinding getBinding() throws CobolBindingException {
try {
CComplexReflectBinding ccem = new CComplexReflectBinding(
getObjectFactory(), getJaxbClass());
return ccem;
} catch (ReflectBindingException e) {
throw new CobolBindingException(e);
}
}
/**
* @return the JAXB type factory to use for the JAXB object type
*/
public Object getObjectFactory() {
return _jaxbElementDescriptor.getObjectFactory();
}
/**
* @return the JAXB type class
*/
public Class < ? > getJaxbClass() {
return getJaxbElementDescriptor().getJaxbClass(); |