Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The default constructor is usually needed for projects of this type. A simple way to get around it is to use:

      Class[] noArgs = new Class[0];

      Class objectClass = ...;

      while( objectClass != null )
      Constructor constructor = objectClass.getConstructor(noArgs);
      if( constructor == null )
      objectClass = objectClass.getSuperclass();
      }

      now you have the default constructor for the object - every object has one, just not accessible in the normal way.

        People

        • Assignee:
          Unassigned
          Reporter:
          ben
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: