Skip to content

PGL protected inner classes should have *public* constructors #6

Closed

Description

@angusforbes

Quirk in Java: If you have a protected inner class then the default constructor is also protected. Which means that I can't override certain methods in PGL.java (e.g., initSurface) without creating brand new versions of all the inner classes.

The easiest fix is just to add a public constructor to each of these inner classes.

For example:

protected class PGLListener implements GLEventListener {
   public PGLListener() {}

   /** existing code... **/
}

I'm in the process of updating the stereographic library to use Processing 2.0 and I need to have access to setting the GLCapabilities. But because of the this protected inner class thing I can't pick and choose methods to override easily.

Activity

  1. benfry commented on Feb 5, 2013

    @benfry
    Contributor

    They haven't been public since that's not an API we've finalized or are planning to support directly. Andrés made a change in a recent commit that will take care of the issue for now, but just keep in mind that the interfaces may change in future releases.

  2. added a commit that references this issue on Jun 12, 2014
    32f6fde
  3. added a commit that references this issue on Nov 18, 2014
  4. github-actions commented on Jun 18, 2021

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  5. locked as resolved and limited conversation to collaborators on Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions