| Marat Matosov 2004-01-19, 10:34 am |
| Hello Dear Sir/Madam !
I have some problem , which occurs at run time during some instantiation of
format Class .. I think so ...
The run time Error is (I copied it from the pannel):
/*
java.lang.VerifyError: (class: composer/aca/formats/MyFormat,
method: <init> signature: ()V) Incompatible object argument for method call
Exception in thread "main"
*/
Please , help me ..... I dont know what is going on there ....
I have the following design of my code :
public class MyFormat extends RecordFormat
{
................
public MyFormat()
{
super();
parser = new org.apache.xerces.parsers.SAXParser(); // I need it for my
class
curParser = new PS10FormaterParser(); // inner
private class of MyFormat class
}
public MyFormat(String arg0) throws IOException
{
super(arg0);
parser = new org.apache.xerces.parsers.SAXParser(); // I need it for
my class
curParser = new PS10FormaterParser(); // inner
private class of MyFormat class
}
public String formatContext(Context aContext)
{
.................
// works pretty well , checked !!!!!
}
public DataElement unformatContext(String aString,Context aContext)
{
.................
// works pretty well , checked !!!!!
}
// I overrided the initializeFrom method in following fashion way :
public Object initializeFrom(Tag tag) throws IOException {
for(Enumeration enumeration = tag.getAttrList().elements();
enumeration.hasMoreElements();)
{
TagAttribute tagattribute =
(TagAttribute)enumeration.nextElement();
if(tagattribute.getName().equals("txnName"))
setTxnName((String)tagattribute.getValue());
}
Tag nextSubTag = null;
int nTags = tag.getSubTags().size();
for (int i = 0; i<nTags ; i++)
{
nextSubTag = (Tag)(tag.getSubTags().elementAt(i));
if (nextSubTag!=null)
{
FormatElement formatElement =
(FormatElement)
getExternalizer().convertTagToObject(nextSubTag);
add(formatElement);
}
}
return
((FormatExternalizer)getExternalizer()).linkToDecorators((FormatElement)
this,tag);
}
|