Ik heb een erg aparte Error waar ik niets van snap:
Method[] myMethods = object.getClass().getMethods();
En hij wijst naar deze code:
Hij geeft op de laatste regel deze error. Dus dat myRoot gene methode genaamd getAttributes heeft. Dit staat wel in alle docs etc.
Om het te testen schrijf ik alle methodes van het object myRoot + hun parameters naar het scherm: (code daarboven)
Output:
Hier word de methode dus wel genoemd. Ik snap het niet meer
Method[] myMethods = object.getClass().getMethods();
code:
1
2
| 2001-09-13 01:43:29 - Ctx( /concept ): Exception in: R( /concept + /account + nu ll) - java.lang.NoSuchMethodError |
En hij wijst naar deze code:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| SAXBuilder mySax = new SAXBuilder();
Document myDoc = mySax.build(fileName);
Element myRoot = myDoc.getRootElement();
// debugging
Method[] myMethods = myRoot.getClass().getMethods();
for (int i = 0; i < myMethods.length; i++)
{
System.out.println(myMethods[i].getName());
Object[] objectArray =myMethods[i].getParameterTypes();
for (int j = 0; j < objectArray.length; j++)
{
System.out.println("\t" + objectArray[j]);
}
}
/// end debugging!
List myList = myRoot.getAttributes(); |
Hij geeft op de laatste regel deze error. Dus dat myRoot gene methode genaamd getAttributes heeft. Dit staat wel in alle docs etc.
Om het te testen schrijf ik alle methodes van het object myRoot + hun parameters naar het scherm: (code daarboven)
Output:
code:
1
2
3
4
5
6
7
8
| getParent
setName
class java.lang.String
getAttributes <---- Hier staat ie dus!!!
getContent
getAttribute
class java.lang.String
class org.jdom.Namespace |
Hier word de methode dus wel genoemd. Ik snap het niet meer