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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:53:16+00:00 2026-05-22T22:53:16+00:00

Using AspectJ with enums I get the next results: public enum EnumName { B,

  • 0

Using AspectJ with enums I get the next results:

public enum EnumName { B, L, A }

EnumName.class.isEnum() : true
EnumName.class.getEnumConstants() : null

If I don’t wave (at compile time) my project, getEnumConstants() works as expected.

Why is this happening? I didn’t found any information on google about this, I’ve tried to decompile the generated classes, but I didn’t got any info from there. This makes me stop using AspectJ if it keeps messing around things.

  • 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-05-22T22:53:17+00:00Added an answer on May 22, 2026 at 10:53 pm

    I’ve got my answer again from AspectJ’s mailing list.
    The problem was that I had a NPE exception in my Advice due to a call to joinPoint.getThis().getName(), getThis() on static methods returns null.
    getEnumConstants() swallowed the exception and just returned null.

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

Sidebar

Related Questions

I'm currently using such blocks of code in my project public ActionStatus GetStuff(out output)
I have an application using AspectJ with load time weaving to advise various methods.
public abstract class Master { public void printForAllMethodsInSubClass() { System.out.println (Printing before subclass method
I am using Spring's declarative transactions (the @Transactional annotation) in aspectj mode. It works
we are using Aspectj compile time loading in Spring source tool suite..when we are
When using Aspect Oriented Programming with Policy injection, how do you deal with policy
I have started using aspects for parameter validation in our development framework. It works
Using online interfaces to a version control system is a nice way to have
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using ASP.NET MVC there are situations (such as form submission) that may require 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.