Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to check if a IVariableBinding corresponds to a static effectively final variable?
How to check if a IVariableBinding corresponds to a static effectively final variable? [message #1865766] Sat, 11 May 2024 01:58
Ivan Ivan is currently offline Ivan IvanFriend
Messages: 57
Registered: May 2015
Member
Hey, I need to check if the given IVariableBinding corresponds to an effectively final static variable. From the documentation, I know that "effectively final" applies only to local variables. But how to check that it has the only assignment in the declaration or a static block?

	public static boolean isStaticEffetivelyFinal(IVariableBinding binding) {
	    if ((binding.getModifiers() & Modifier.STATIC) == 0) {
	        return false;
	    }
	    // ???
	}
Previous Topic:Jgoodies no class defined error
Next Topic:Regression: Expressions broken for Remote Java Application in recent Eclipse versions
Goto Forum:
  


Current Time: Wed Jan 15 17:26:14 GMT 2025

Powered by FUDForum. Page generated in 0.02632 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top