Reflectively obtain an inner object's outer object

So, I have an object which is an instance of an inner class. I need to find reflectively the instance of the outer class which is associated with it.
I might not be seeing the wood for the trees here but I can't see how. Effectively I need an object equivalent of "Class.getDeclaringClass()"
An example to help explain, if required:
public class FindOuterObject
     public static void main(String[] args)
          new FindOuterObject();
     private FindOuterObject()
          InnerObject i = new InnerObject();
          Object o = findOuterObject(i);
          System.out.println((o == this) ? "Worked" : "Failed");
     private static Object findOuterObject(Object innerObject)
          // Need to fill in this method to work for any object passed in
          return null;
     public class InnerObject
}

I'd say that hints at a problematic design.
And I'd wholeheartedly agree :o)
It's a little fudge I'm just currently tring to do. I've got a 'toggle' action which needs to maintain its state, and I want to keep any associated buttons (typically JCheckBoxMenuItems) updated according to the toggle state (which can be modified in several ways).
The code currently whips through the PropertyChangeListeners looking for buttons and calling "setSelected()" as appropriate, but the PCL registered by a JMenuItem is an inner object. I need to call a method on the button object.
I'm contractually obliged to work with 1.4.2 so I can't take advantage of the new Swing functionality to do this automagically.
I'm looking for another workaround and it's not desperately important anyway but I thought it was an interesting poser nonetheless :o)

Similar Messages

  • How to make an object getting out of the screen ?

    Hello everybody !
    I am creating a game introduction with Flash pro CS6 and here's is my problem.
    I want a object in my animation to leave the screen, but I dont know how to do it.
    Is there for example, a way to delimited the working area, so that when I make an object go out of this area, it does not appear in my final animation ( no matter the format, .avi, .mov, spritesheets ... ) or can eventualy be "cut" ( if I make my object half inside the working arear and half outside ) ?
    Is there an other way to do this ?
    Thanks !

    Using a mask might be one way.

  • Problem to check out object in siebel 8.1, using Windows Vista

    Hi people,
    i'm quite new to siebel and recently, i am supposed to start developing applets and BCs. The problem is, i cant check out object from the server. whenever i hit the button Check Out, the system (Siebel 8.1) is hang and stop responding. Can anyone help me on this? Thank you so much.
    Zaly#

    Hi,
    i've tried both ODBC, SSD Default instance and SSD Local Db default instance. Both yielded same result, which the connection is successful. But for SSD Default Instance, whenever i tried to hit the button 'Test Connect' for 2nd time or more, it will stop responding and hang. Only the first time is succesful.
    I really dont have the idea how the problem occurs. but it works well if i do check out in computer that runs on window XP. Is the problem comes because i'm using vista?

  • Unable to access the objects with out schema as prefix.. can any body help

    Hi,
    i am using 10g.I have one problem like i unable to get the table access with out mention prefix for that table.
    but i created public synonym and gave all grants to all users also. but still i need to mention schema name as prefix otherwise it give the error..
    can any body tell me reason and give me solution.
    ex: owner:eiis table:eiis_wipstock
    connect to: egps schema
    in this position if i try with eiis.wipstock it gives error but if i mention like eiis.wiis_wipstock then its working fine.

    Pl do not spam the forums with duplicate posts - Unable to access the objects with out schema as prefix.. can any body help

  • How to organize the context object through out the application process

    Hi,
    Here in my application is using the following steps for a process.
    - Login
    - Search
    - Update
    - Logout
    In those above steps, Login, Search, and Update actions are touching to database/LDAP every time. In each time, Im creating new Context object, I think this is a bad approach. When I hit the login, I need to get the connection object and use that for rest of the actions(search and update).
    So can we organize the single context object through out the application? And where do we need to close the Context object?

    Don't worry about it. The provider will reuse connections behind the scenes. They're not tied directly to Contexts.

  • Accessing Java Object with out any application servers

    Hi,
    I would be much thankful if any one guide/suggest me how to
    access an java object with out using any application servers.I am
    having an java object which holds dummy data and an mxml file which
    contains some text fields. My plan was to access the java object
    and put the dummy data in the text fields. I am using RemoteObject
    for this. I am not able to proceed further. Please help me.
    Thanks in advance
    Regards
    Karun Kumar

    You can check The Merapi Project it's still in the
    development phase but it'll allow to an AIR app invoke a java class
    and run it as it were inside your app. But that's something you
    can't take into production yet, why don't u wanna use a server
    backend?

  • Clipping Out Objects

    I know this may be a very redundant subject, but I was wondering if anyone knew about a very precise and fast way to clip out objects? I am aware of using clipping masks, lasso selecting tool, and drawing paths. Personally I think drawing paths or using the lasso selector tool and eyeballing is the most precise - but not very quick. I sometimes use the path detecting tool in Photoshop and Indesign - which are quick but not very precise? Is there a to clip out items from photos that are quick and precise without using other tools like a green screen? Thanks for any help!

    Hi Daveydave.
    The trick to getting precise masks is to use the channels palette. Choose the channel with the best edge contrast for the shape you are cutting out and dupe it. Then work on increasing the contrast further until it is almost all black and white (reducing the greys). There are numerous ways to increase the contrast. I usually start with a selection made using the lasso tool well within the object edge and filling it with black then a fill of white well outside the edge of the object. Then there is just the edge itself to deal with. Initially using 'apply image' is useful for refining the contrast and picking out the edge, but also the dodge and burn tools can do the job. When you have refined the duplicate channel. Make a selection and then turn it into a layer mask. Hej presto a precise editable cutout.
    The above may sound tedious but it actually only takes a few minutes.
    I recommend you look at Katrin Eismann's 'Masking and Composition'.

  • Objects generated out of order

    I have noticed that the DDL generated will often have objects generated out of order, such as some (but not all) tables and views being generated before the drop database command.
    Is there something I am missing in the setup or options for generation that would make objects be generated in the logical order, i.e. tablespaces before tables, no ojects in the database before dropping the database, etc..
    I am running 16.1.0.3917 EBF 18.
    DB is DB2 z/OS V10

    Everything in the generation order seems to be correct.  I have not tried to merge the model.
    <Order>
    <Metaclass Name="Database">
       <Metaclass Name="Database::Permission" />
    </Metaclass>
    <Metaclass Name="Storage" />
    <Metaclass Name="Tablespace" />
    <Metaclass Name="BusinessRule" />
    <Metaclass Name="Sequence">
       <Metaclass Name="Sequence::Permission" />
    </Metaclass>
    <Metaclass Name="AbstractDataType">
       <Metaclass Name="AbstractDataType::Permission" />
    </Metaclass>
    <Metaclass Name="PhysicalDefault" />
    <Metaclass Name="PhysicalDomain" />
    <Metaclass Name="User" />
    <Metaclass Name="Group" />
    <Metaclass Name="Role" />
    <Metaclass Name="Table">
       <Metaclass Name="Table::Index" />
       <Metaclass Name="Table::Key" />
       <Metaclass Name="Table::Permission" />
    </Metaclass>
    <Metaclass Name="View">
       <Metaclass Name="View::ViewIndex" />
       <Metaclass Name="View::Permission" />
    </Metaclass>
    <Metaclass Name="Reference" />
    <Metaclass Name="JoinIndex" />
    <Metaclass Name="Synonym">
       <Metaclass Name="Synonym::Permission" />
    </Metaclass>
    <Metaclass Name="Dimension" />
    <Metaclass Name="Procedure">
       <Metaclass Name="Procedure::Permission" />
    </Metaclass>
    <Metaclass Name="DatabasePackage">
       <Metaclass Name="DatabasePackage::Permission" />
    </Metaclass>
    <Metaclass Name="Table::Trigger" />
    <Metaclass Name="DBMSTrigger" />
    <Metaclass Name="View::Trigger" />
    <Metaclass Name="WebService" />
    <Metaclass Name="ExtendedObject">
       <Metaclass Name="ExtendedObject" Stereotype="AuxiliaryTable" />
       <Metaclass Name="ExtendedObject" Stereotype="TrustedContext" />
       <Metaclass Name="ExtendedObject" Stereotype="Mask" />
       <Metaclass Name="ExtendedObject" Stereotype="RowPermission" />
    </Metaclass>
    </Order>

  • Cannot access out object  Help Pls

    Hi
    In my jsp page , i had created some functions .. in those functions i am not able to access the out object
    ( out.println(" ")) . can any one of u explain me why i am not able to acces that ??.. i had attached the error given by the webserver . pls help me :)
    Error Message Given by webserver --> Undefined variable or class name: out out.println( cal +" "+ iStartTime+" "+ iStartMin+" "+ iStartSec+" "+iEndTime+" "+iEndMin+" "+iEndSec);

    Thanks for ur reply .. but i had already included that in my jsp files ....
    pls see my declaration ..
    <%@ page import="java.io.*"%>
    <%@ page import="java.util.*"%>
    <%@ page import="java.util.Date"%>
    <%@ page import="java.sql.*"%>
    <%@ page import="javax.servlet.*"%>
    <%@ page import="javax.servlet.http.*" %>
    I cannot access the out class ONLY in the function i had declared .. i can access the out class in other parts of the program

  • X'ed out Objects in Lookout 5.0

    Recently our FP-1601 module took a blackout. Since then one of our Lookout 5.0 screens has red X'ed out objects. I verified that I can ping the FP-1601 module from the Lookout computer and can also view it as running in the FP-Explorer. Is it possible Lookout 5.0 is confused and needs to be reset to see the objects? How can I verify that I can poll the objects? Thanks in advance.

    The "nonexistent, access denied" message would imply (I am guessing here) that the Process is unreachable.
    For you to find out if you're using the OPCFieldPoint or the native FieldPoint, you would have to go into Edit mode, and then in the Object Explorer from the Object menu. Here, you should see your FP Objects. Right-click them and go into properties to find out what kind of an object they are.
    You can also find this info' from the LKS file. Look for the "new" keyword in there.
    Connection browser, again under the Object menu in Edit mode, lets you see the relationships between various objects and processes. Looks like you're having problems because not all of your processes are running. El
    iminate this possibility by making sure all your processes are running. We shall then see if you still get the red Xs.
    Khalid

  • X'ed out objects on screen.

    Recently our Windows XP computer crashed due to a black out. Since then one of our control screens (Lookout 5.0) has x'ed out objects and we can't control. I have gone through the field point (FP-1601) explorer and verified that I can ping it and view it in the explorer. Any thoughts are greatly appreciated. If the FP-1601 suffered the blackout as well is it possible it needs to FP rack/rail needs to be reset. And how do you properly reset a FP-1601 rack?

    You can perform a reset on a FP-1601 by cycling power to the module. This forces the module to reboot and clear the RAM. To reset all of the saved configurations, flip the reset switch (DIP switch 8) to the On position and then power the module. Once the Status LED starts flashing, remove power to the module, disable the reset switch, and power the module back on. At this point you will need to reconfigure the ethernet settings of the FP-1601.
    Regards,
    Aaron

  • How to get the values of the objects inside an object??

    Hi,
    I am trying to write code to display name and memory usage of all session attributes, in a recursive way.
    I suppose reflection is needed here, but I can’t figure out how to get the values of the objects inside an object...
    private void handleIt(String attributeName, Object attributeValue) {
         boolean isPrimitiveOrNull = ((null == attributeValue) ||
              (attributeValue.getClass().isPrimitive()));                                         
         if (isPrimitiveOrNull) {
              sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
         } else {
              sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");               
              Field[] fields = attributeValue.getClass().getDeclaredFields();
              int lim = fields.length;
              String name;
              Object value = null;
              for (int i = 0; i < lim; i++) {
                   name = fields.getName();
                   //LOOK AT THIS LINE: !!!!!!!!!!!!!!!!!!!!!!!!!!!
                   value = fields[i].get(obj); //I don´t know what 'obj' should be??
                   handleIt(name, value);
              sb.append("}");               
    Any suggestions will be greatly appreciated...

    I realized that massive int objects called MAX_VALUE, MIN_VALUE and SIZE where causing the StackOverflow, so I removed them from the analysis.
    This is the resultant code. But I think it isn’t accurate in calculating the real size of objects being got using reflexion.
    Do you or somebody have any more suggestions?
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.ObjectOutputStream;
    import java.lang.reflect.Field;
    import java.util.Enumeration;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class SessionMeasurer extends HttpServlet {
         private static final long serialVersionUID = 1470488362727841992L;
         private StringBuilder sb = new StringBuilder();
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              performTask(request, response);
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              performTask(request, response);
         public void performTask(HttpServletRequest request, HttpServletResponse response) {
              HttpSession     session = request.getSession(false);     
              String attributeName = "";
              Object attributeValue = null;
              for (Enumeration<?> attributeNames = session.getAttributeNames(); attributeNames.hasMoreElements();) {
                   attributeName = (String)attributeNames.nextElement();
                   attributeValue = session.getAttribute(attributeName);
                   handleIt(attributeName, attributeValue);               
              System.out.println(sb.toString());
         private void handleIt(String attributeName, Object attributeValue) {           
              if (attributeValue != null) {          
                   boolean isPrimitive = attributeValue.getClass().isPrimitive();
                   if (isPrimitive) {
                        sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
                   } else {
                        sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");               
                        Field[] fields = attributeValue.getClass().getDeclaredFields();
                        String name;
                        Object value = null;
                        int lim = fields.length;
                        for (int i = 0; i < lim; i++) {
                             name = fields.getName();                                                                                                         
                             if (!name.endsWith("_VALUE") && !name.equals("SIZE") && !name.equals("serialVersionUID")) {
                                  try {
                                       value = fields[i].get(attributeValue);
                                  } catch(Exception e) {
                                       //PENDIENTE: Tratamiento excepción
                                  handleIt(name, value);
                        sb.append("}");               
         private int sizeOf(Object obj) {
              //Valid only for Serializables
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              ObjectOutputStream oos = null;     
              byte[] bytes = null;               
              try {          
                   oos = new ObjectOutputStream(baos);
                   oos.writeObject(obj);
                   bytes = baos.toByteArray();
              } catch(Exception e) {               
                   //PENDIENTE: Tratamiento excepción
              } finally {
                   if (oos != null) {
                        try {
                             oos.close();
                        } catch(Exception e) {
                             //PENDIENTE: Tratamiento excepción                         
                   if (baos != null) {
                        try {
                             baos.close();
                        } catch(Exception e) {
                             //PENDIENTE: Tratamiento excepción                         
              int size = -1;
              if (bytes != null) {
                   size = bytes.length;
              return size;          

  • [ORA-22905] How to read a field of an object inside another object?

    Greetings,
    I'm a student and in a current exercise we have to work with the Object Oriented Programming functionality of Oracle.
    In the database we defined an object type, which is then considered inside another object type. The thing is, that I cannot read an attribute of the inner object. I've read tens of websites but none of them have helped so far. I've read the PL/SQL User Guide and Reference document also.
    The inner object is defined as follows:
    create type address_t as object (
            street varchar(50),
            city varchar(50),
            pcode number(5,0)
            );The outer object has an object of type address_t inside it:
    CREATE TYPE professor_t as OBJECT(
              code number(2),
              p_name varchar(50),
              address address_t,
              );Also, there is a table named PROFESSORS that stores objects of type professor_t
    First of all, with a simple testing SQL statement I can see the data inside the object professor, even the object address_t:
    SELECT * FROM PROFESSORS WHERE CODE = 13;returns the following:
    CODE    |         NAME      |       ADDRESS
    13      |         JOHN     |       MYSCHEMA.ADDRESS_T('FIFTH AVENUE','NEW YORK',12345)The thing is, I want to read the field street of the object address (of type address_t) inside professor (of type professor_t).
    I could see everywhere that the way to go is to use point notation, and I've seen examples about the command VALUE, but none of the following SQL statements work:
    SELECT VALUE(ADDRESS.STREET) FROM(
      SELECT CODE,P_NAME,ADDRESS FROM PROFESSORS WHERE CODE = 13);
    SELECT ADDRESS.STREET FROM PROFESSORS WHERE CODE = 13;
    SELECT PROFESSOR.ADDRESS.STREET FROM PROFESSORS WHERE CODE = 13;I'd really appreciate if someone could show me how to access the values of the field of the object inside an object.
    Thanks in advance,
    - David
    Edited by: 858176 on May 11, 2011 6:53 PM Formatting

    Great, this worked so far.
    It is curious that you wrote 'profesores' but that is the actual name for the variable. I translated everything to english in order to post it here.
    So, the statement is:
    select value(t).DIRECCION.CIUDAD from profesores t;And It returned:
    VALUE(T).DIRECCION.CIUDAD                         
    Valencia                                          
    New York
    TijuanaAnd, applying the VALUE command to the statement:
    select codigo,
    nombre,
    value(t).DIRECCION.CALLE,
    value(t).DIRECCION.CIUDAD,
    value(t).DIRECCION.CP
    from profesores T WHERE T.CODIGO = 13;Resulting in:
    CODIGO                 NOMBRE                                             VALUE(T).DIRECCION.CALLE                           VALUE(T).DIRECCION.CIUDAD                          VALUE(T).DIRECCION.CP 
    13                     Pepito Pérez                                       Calle de los Rosales 0                           Valencia                                           46023                  That is EXACTLY what I needed.
    Thanks Thomas, It was really helpful !
    Edited by: 858176 on May 11, 2011 7:46 PM

  • JAVA&SOAP:how to return a complex object( the object has an object within)

    Lets say my Complex object is :
    public class PersonWithAddress {
    private String name;
    private int ssn ;
    private Address add;
    PersonWithAddress() {
    name="Gagan Tandon" ;
    ssn =1111;
    add = new Address("1113","WestPlum Street");
    public String getName() {
    return name;
    public int getSSN() {
    return ssn;
    public Address getAddress() {
    return add;
    This complex object has Address object embedded in it.
    public class Address {
    private String house;
    private String street;
    public Address (String myHouse,String myStreet) {
    house = myHouse;
    street = myStreet;
    public String getHouse() {
    return house;
    public String getStreet() {
    return street;
    My deployment Descriptor is as following: check the mappings part.
    <isd:service xmlns:isd=
    "http://xml.apache.org/xml-soap/deployment"
    id="urn:xml-soap-person-demo">
    <isd:provider type="java"
    scope="Application"
    methods="getPersonWithAddress">
    <isd:java class="PersonServer"/>
    </isd:provider>
    <isd:faultListener>
    org.apache.soap.server.DOMFaultListener
    </isd:faultListener>
    <isd:mappings>
    <isd:map
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:x="urn:xml-soap-person-demo" qname="x:PersonWithAddress"
    javaType="PersonWithAddress"
    java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
    xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
    <isd:map
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:x="urn:xml-soap-person-demo" qname="x:Address"
    javaType="Address"
    java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
    xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
    </isd:mappings>
    </isd:service>
    And in my SOAPRPC code at client end calls the following: check the mappingregistry code...
    String serverHost = "http://localhost:8082/soap/servlet/rpcrouter";
    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    Parameter p= null;
    try {
    System.out.println("here 0");
    Response r=null;
    Call c=new Call();
    Vector parameters = new Vector();
    System.out.println("here 1");
    c.setTargetObjectURI ("urn:xml-soap-person-demo");
    c.setMethodName ("getPersonWithAddress");
    System.out.println("here 3");
    c.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    // parameters.addElement (new Parameter("name", String.class, "Web Services Client", null));
    // c.setParams (parameters);
    c.setSOAPMappingRegistry(smr);
    BeanSerializer beanSer = new BeanSerializer();
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new QName("urn:xml-soap-person-demo","Address"),Address.class,beanSer,beanSer);
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new QName("urn:xml-soap-person-demo","PersonWithAddress"),PersonWithAddress.class,beanSer,beanSer);
    try
    System.out.println("here 4");
    r = c.invoke ( new URL(serverHost), "" );
    // org.apache.soap.SOAPException can be thrown
    catch ( Exception e )
    e.printStackTrace();
    // Check the response.
    if (r.generatedFault ()) {
    Fault f = r.getFault();
    System.out.println ("Error Occurred: ");
    System.out.println (" Fault Code = " + f.getFaultCode());
    System.out.println (" Fault String = " + f.getFaultString());
    // return f.getFaultString();
    // return new String("gagan");
    return null;
    else {
    System.out.println("here 5");
    p = r.getReturnValue();
    System.out.println("here 6");
    // System.out.println( (String)greeting.getValue() );
    System.out.println("SSN: " + ((PersonWithAddress)p.getValue()).getSSN());
    return (PersonWithAddress) p.getValue();
    catch( Exception e ){
    e.printStackTrace();
    // finally {
    // return null;// String("not OK");
    if (p==null)
    return null;
    else
    return (PersonWithAddress) p.getValue();
    When running this code..
    The following error is thrown.
    System.out.println("here 4") is printed.
    [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to instantiate 'PersonWithAddress': Class org.apache.soap.encoding.soapenc.BeanSerializer can not access a member of class PersonWithAddress with modifiers ""; targetException=java.lang.IllegalArgumentException: Unable to instantiate 'PersonWithAddress': Class org.apache.soap.encoding.soapenc.BeanSerializer can not access a member of class PersonWithAddress with modifiers ""]
    at org.apache.soap.rpc.Call.invoke(Call.java:294)
    at PersonClient.getPersonWithAddress(PersonClient.java:92)
    at PersonClient.<init>(PersonClient.java:11)
    at PersonClient.main(PersonClient.java:20)
    java.lang.NullPointerException
    at PersonClient.getPersonWithAddress(PersonClient.java:96)
    at PersonClient.<init>(PersonClient.java:11)
    at PersonClient.main(PersonClient.java:20)
    I am here 1
    Exception in thread "main" java.lang.NullPointerException
    at PersonClient.<init>(PersonClient.java:13)
    at PersonClient.main(PersonClient.java:20)
    What could be the problem..? Is there any info on net how could i pass complex objects of this type in Java through SOAP RPC.
    GAGAN

    Have you managed to sole the problem ? I have got similar one...
    [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to instantiate 'auction.common.Property': auction/common/Property]
         at proxy.soap.AuctionHistoryProxy.addAuctionProperty(AuctionHistoryProxy.java:515)
         at java.lang.reflect.Method.invoke(Native Method)
    (...)

  • Using null for parameterized "newInstance(Object [])" method in Object[].

    I have a really serious problem. I am creating instances of specific classes by using reflection techniques. I am reading a flat file, finding class from its name and creating it by using its parameterized constructor. Example:
    line 1: Dummy("A",Dummy2("B"),12,,"C");
    I create an instance of Dummy with parameters "A", an instance of Dummy2 object with value "B", 12 (I use here Integer as wrapper), null (There is no wrapper for null :( ) and "C".
    I find constructor by using findConstructors() and looking their parameter counts, creating an object array with given values and calling:
    constructorIFoundBefore.newInstance(objectArrayIPrepared);
    But!!!
    Because I use null directly, I got this message:
    java.lang.IllegalArgumentException: argument type mismatch
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at reader.parser.ObjectCreator.createObjectFromObjectItem(ObjectCreator.java:192)
         at reader.parser.ObjectCreator.createObjectFromParseItem(ObjectCreator.java:112)
         at reader.parser.ObjectCreator.createObject(ObjectCreator.java:78)
         at reader.analyzer.FileAnalyzer.analyzeAndCreateObjects(FileAnalyzer.java:95)
         at reader.ReverseReader.main(ReverseReader.java:43)
    I will be very glad if you help me.
    Thanks a lot!
    Gokcer

    I said something wrong. Sorry. While invoking a method (or a constructor) we need an object array which are equivalent to parameters. For example to call a method or constructor for class A;
    class A {
    int age;
    String name;
    public A(int age, String name){
    this.age = age;
    this.name = name;
    public set(int age, String name){
    this.age = age;
    this.name = name;
    we use in any place
    A a1 = new A(12,"Gokcer");
    A a2 = new A(15,null);
    To achieve this by using reflection techniques, we must find constructor with two parameters of class A. At this point "BetterMethodFinder" will give great help.
    After finding right constructor, we must create an object array to tell the constructor parameters (age and name). At this point we need an object array which stores our parameters. Code must be like this.
    Object []params = new Object[2]; // we have two parameters.
    params[0] = new Integer(12); // we can't use params[0]=12
    // because 12 is not an object. (It is a
    // primitive type)
    params[1] = "Gokcer";
    Now create the new object.
    A a1;
    a1 = constructorWeFound.newInstance(params);
    While creating param[], we could also use:
    Object []params = new Object[2] {new Integer(12),"Gokcer"};
    While creating a2, we can use "null" directly for second parameter.
    params = new Object[2] = {new Integer(15), null};
    or
    Object []params = new Object[2];
    params[0] = new Integer(15);params[1] = null;
    Thanks again everyone who replied me.
    My sincerely...

Maybe you are looking for

  • Transportation problem in Dev system

    Hello All, I am getting the problem in Transportation. While i am transporting the request from Dev to Quality, the problem is comming in Export. please see the bellow error messages. Exports with Errors       No Further Transport     TBD TB Developm

  • Disappearing palettes in Dreamweaver CS3

    After launching Dreamweaver CS3 on my MacBook Pro in Mac OSX 10.4.9, I discovered that my insert bar, properties palette and many of the other palettes had become transparent with only their title bars visible. Clicking inside the invisibale areas si

  • Fetching data for multiple POs one by one using BAPI..

    Hi, We have created a custom BAPI which gives all the details regading a given PO in multiple tables. Now in a report I have to give a range of PO numbers which should be passed to BAPI one by one and then the data that will is fetched in BAPI tables

  • "re-importing" Yahoo Mail Contacts

    Been using Yahoo Mail for 2 years on my iPhone 4s with my Yahoo Mail contacts also for my phone contacts.  Yesterday, they "disappeared" from my phone contacts, and I can not get them to re-import.  All settings seem to be right.   Thanks for any hel

  • Gargeband file into kenote slide by slide

    I created a voice track for one slide in a kenote presentation. As instructed, I opened the media window, found the file, and dragged the file onto the slide pallatte. The file, however, continues to bounce back and will not import. Using the inspect