devxlogo

RMIC and Inner Classes

RMIC and Inner Classes

Question:
Can RMIC make stubs for inner classes? When I tryrmic packagename.OuterClassName$InnerClassName, it doesn’t work.

Answer:
Yes, RMIC can make stubs for inner classes. However, you must use thefully qualified name of the class to do so. In your example you haveused an “$” instead of an “.” to denote the name of the inner class. Classfiles generated for inner classes separate the outer class name fromthe inner class name using a $ character. But the fully qualifiedname of an inner class uses a dot to separate the outer class namefrom the inner class name. Therefore your example should usepackagename.OuterClassName.InnerClassName.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist