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 8985697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:22:55+00:00 2026-06-15T21:22:55+00:00

I am writing an annotation processor and I need to instantiate a class being

  • 0

I am writing an annotation processor and I need to instantiate a class being processed.

I am extracting some documentation based on the class and its annotations, and I’d like to run a method from this class and output the result in the generated documentation.

Unfortunately, when I try to instantiate it I have a ClassNotFoundException which seems logical to me as the processing happens before the compilation round.

I am currently writting an xml file that holds the documentation, maybe there is an annotation post-processor or something similar?

Do you have any idea of workaround?

  • 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-15T21:22:56+00:00Added an answer on June 15, 2026 at 9:22 pm

    Well, definitely, we cannot access a class being processed because at the same time it is being compiled.

    And there is no way to run the annotation processor after the compilation round.

    Then I searched in maven and spot the phase: process-classes

    It is executed just after the compilation succeed, so it is perfect for my needs. During this phase I execute a java class that reads the xml file I have generated during the annotation processing. At this point I can access everything !

    HIH

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

Sidebar

Related Questions

I would like to do some annotation processing based on the example in the
Writing documentation in html requires some code examples. What to do with characters that
I would like to build my own custom DI framework based on Java annotations
I'm writing a Singleton class in Java EE 6 using the @Singleton annotation. I
I'm writing an swing app and i'd like to have 'wait' cursor when some
I'm writing an annotation processor that runs within javac. It scans annotated classes and
By writing an annotation processor I can turn any Java text file into an
I'm writing a video annotation application with Qt4 in which users need to be
I am interested in writing an annotation processor for the maven-processor-plugin. I am relatively
In writing an Annotation Processor using the Java 6 API, I came across a

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.