Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] enum wildcard value matching

Hi,

Is this the only way to match a particular enum value ? I thought
there would be a enum wildcard value matching or something like that.

	@Pointcut(
	"execution(List<T> getSameValue()) && target(testEnum) && if()")
	public static boolean testPointcut1( TestEnum testEnum ){
		return testEnum == TestEnum.Value2;
	}

	@Before("testPointcut1(testEnum)")
	public void test1( TestEnum testEnum ) {
		System.out.println( "Generics aspect [" + testEnum.ordinal() + "]" );
	}

Thanks,
Mohan


Back to the top