Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8425013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:09:38+00:00 2026-06-10T04:09:38+00:00

The most upvoted answer to this question suggests searching class-files with specific names in

  • 0

The most upvoted answer to this question suggests searching class-files with specific names in specific folders, as a workaround for reflecting anonymous inner classes. In which document (if any) are the names and locations of Java class-files specified?

The VM-spec contains a detailed specification of the format of class-files, but there seems to be no specification of how they should be named and where they should be stored. Likewise, the language-spec does not seem to touch on this subject.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:09:39+00:00Added an answer on June 10, 2026 at 4:09 am

    From the source code of the Class class (getSimpleName method) :

     1137           // According to JLS3 "Binary Compatibility" (13.1) the binary
     1138           // name of non-package classes (not top level) is the binary
     1139           // name of the immediately enclosing class followed by a '$' followed by:
     1140           // (for nested and inner classes): the simple name.
     1141           // (for local classes): 1 or more digits followed by the simple name.
     1142           // (for anonymous classes): 1 or more digits.
    

    The mentioned document : JLS3 “Binary Compatibility” (13.1) states it like this (more precise but less concise) :

    Furthermore, the resulting class file must have certain properties. A
    number of these properties are specifically chosen to support source
    code transformations that preserve binary compatibility. The required
    properties are:

    The class or interface must be named by its binary name, which must
    meet the following constraints:

    The binary name of a top level type (§7.6) is its canonical name
    (§6.7).

    The binary name of a member type (§8.5, §9.5) consists of the binary
    name of its immediately enclosing type, followed by $, followed by the
    simple name of the member.

    The binary name of a local class (§14.3) consists of the binary name
    of its immediately enclosing type, followed by $, followed by a
    non-empty sequence of digits, followed by the simple name of the local
    class.

    The binary name of an anonymous class (§15.9.5) consists of the binary
    name of its immediately enclosing type, followed by $, followed by a
    non-empty sequence of digits.

    The binary name of a type variable declared by a generic class or
    interface (§8.1.2, §9.1.2) is the binary name of its immediately
    enclosing type, followed by $, followed by the simple name of the type
    variable.

    The binary name of a type variable declared by a generic method
    (§8.4.4) is the binary name of the type declaring the method, followed
    by $, followed by the descriptor of the method as defined in The Java™
    Virtual Machine Specification, Java SE 7 Edition, followed by $,
    followed by the simple name of the type variable.

    The binary name of a type variable declared by a generic constructor
    (§8.8.4) is the binary name of the type declaring the constructor,
    followed by $, followed by the descriptor of the constructor as
    defined in The Java™ Virtual Machine Specification, Java SE 7 Edition,
    followed by $, followed by the simple name of the type variable.

    So it can be said that the commonly known naming scheme is perfectly normalized and we can rely on it (as must rely all class loaders to find the necessary class files).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In this question , it is said in the most upvoted answer: Use liquid
Most of this info isn't needed to answer my question, I am including it,
This question was inspired a bit by this question , in which the most
chances are if you are seeing this you most likely saw my last question
Most rails projects have a very specific version included in their gemfile, right after
This is a multi-part question , so feel free to give input on any
Most of my ASP.NET website is accessible to an anonymous web users. However there
Most of the examples I found on the net write this: if(x != nil)
Most OSes use paging for virtual memory. Why is this? Why not use segmentation?
Most Rails tutorials show how to populate a model class via the params hash

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.