org.aspectj.weaver.tools.FuzzyBoolean Java Examples

The following examples show how to use org.aspectj.weaver.tools.FuzzyBoolean. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AspectJExpressionPointcut.java    From spring-analysis-note with MIT License 6 votes vote down vote up
private FuzzyBoolean contextMatch(@Nullable Class<?> targetType) {
	String advisedBeanName = getCurrentProxiedBeanName();
	if (advisedBeanName == null) {  // no proxy creation in progress
		// abstain; can't return YES, since that will make pointcut with negation fail
		return FuzzyBoolean.MAYBE;
	}
	if (BeanFactoryUtils.isGeneratedBeanName(advisedBeanName)) {
		return FuzzyBoolean.NO;
	}
	if (targetType != null) {
		boolean isFactory = FactoryBean.class.isAssignableFrom(targetType);
		return FuzzyBoolean.fromBoolean(
				matchesBean(isFactory ? BeanFactory.FACTORY_BEAN_PREFIX + advisedBeanName : advisedBeanName));
	}
	else {
		return FuzzyBoolean.fromBoolean(matchesBean(advisedBeanName) ||
				matchesBean(BeanFactory.FACTORY_BEAN_PREFIX + advisedBeanName));
	}
}
 
Example #2
Source File: AspectJExpressionPointcut.java    From java-technology-stack with MIT License 6 votes vote down vote up
private FuzzyBoolean contextMatch(@Nullable Class<?> targetType) {
	String advisedBeanName = getCurrentProxiedBeanName();
	if (advisedBeanName == null) {  // no proxy creation in progress
		// abstain; can't return YES, since that will make pointcut with negation fail
		return FuzzyBoolean.MAYBE;
	}
	if (BeanFactoryUtils.isGeneratedBeanName(advisedBeanName)) {
		return FuzzyBoolean.NO;
	}
	if (targetType != null) {
		boolean isFactory = FactoryBean.class.isAssignableFrom(targetType);
		return FuzzyBoolean.fromBoolean(
				matchesBean(isFactory ? BeanFactory.FACTORY_BEAN_PREFIX + advisedBeanName : advisedBeanName));
	}
	else {
		return FuzzyBoolean.fromBoolean(matchesBean(advisedBeanName) ||
				matchesBean(BeanFactory.FACTORY_BEAN_PREFIX + advisedBeanName));
	}
}
 
Example #3
Source File: AspectJExpressionPointcut.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
private FuzzyBoolean contextMatch(Class<?> targetType) {
	String advisedBeanName = getCurrentProxiedBeanName();
	if (advisedBeanName == null) {  // no proxy creation in progress
		// abstain; can't return YES, since that will make pointcut with negation fail
		return FuzzyBoolean.MAYBE;
	}
	if (BeanFactoryUtils.isGeneratedBeanName(advisedBeanName)) {
		return FuzzyBoolean.NO;
	}
	if (targetType != null) {
		boolean isFactory = FactoryBean.class.isAssignableFrom(targetType);
		return FuzzyBoolean.fromBoolean(
				matchesBeanName(isFactory ? BeanFactory.FACTORY_BEAN_PREFIX + advisedBeanName : advisedBeanName));
	}
	else {
		return FuzzyBoolean.fromBoolean(matchesBeanName(advisedBeanName) ||
				matchesBeanName(BeanFactory.FACTORY_BEAN_PREFIX + advisedBeanName));
	}
}
 
Example #4
Source File: AspectJExpressionPointcut.java    From spring4-understanding with Apache License 2.0 6 votes vote down vote up
private FuzzyBoolean contextMatch(Class<?> targetType) {
	String advisedBeanName = getCurrentProxiedBeanName();
	if (advisedBeanName == null) {  // no proxy creation in progress
		// abstain; can't return YES, since that will make pointcut with negation fail
		return FuzzyBoolean.MAYBE;
	}
	if (BeanFactoryUtils.isGeneratedBeanName(advisedBeanName)) {
		return FuzzyBoolean.NO;
	}
	if (targetType != null) {
		boolean isFactory = FactoryBean.class.isAssignableFrom(targetType);
		return FuzzyBoolean.fromBoolean(
				matchesBeanName(isFactory ? BeanFactory.FACTORY_BEAN_PREFIX + advisedBeanName : advisedBeanName));
	}
	else {
		return FuzzyBoolean.fromBoolean(matchesBeanName(advisedBeanName) ||
				matchesBeanName(BeanFactory.FACTORY_BEAN_PREFIX + advisedBeanName));
	}
}
 
Example #5
Source File: AspectJExpressionPointcut.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
@SuppressWarnings("rawtypes")
@Deprecated
public boolean couldMatchJoinPointsInType(Class someClass) {
	return (contextMatch(someClass) == FuzzyBoolean.YES);
}
 
Example #6
Source File: AspectJExpressionPointcut.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
@SuppressWarnings("rawtypes")
@Deprecated
public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) {
	return (contextMatch(someClass) == FuzzyBoolean.YES);
}
 
Example #7
Source File: AspectJExpressionPointcut.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public FuzzyBoolean matchesStatically(MatchingContext context) {
	return contextMatch(null);
}
 
Example #8
Source File: AspectJExpressionPointcut.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
@SuppressWarnings("rawtypes")
@Deprecated
public boolean couldMatchJoinPointsInType(Class someClass) {
	return (contextMatch(someClass) == FuzzyBoolean.YES);
}
 
Example #9
Source File: AspectJExpressionPointcut.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
@SuppressWarnings("rawtypes")
@Deprecated
public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) {
	return (contextMatch(someClass) == FuzzyBoolean.YES);
}
 
Example #10
Source File: AspectJExpressionPointcut.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public FuzzyBoolean matchesStatically(MatchingContext context) {
	return contextMatch(null);
}
 
Example #11
Source File: AspectJExpressionPointcut.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
@SuppressWarnings("rawtypes")
@Deprecated
public boolean couldMatchJoinPointsInType(Class someClass) {
	return (contextMatch(someClass) == FuzzyBoolean.YES);
}
 
Example #12
Source File: AspectJExpressionPointcut.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
@SuppressWarnings("rawtypes")
@Deprecated
public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) {
	return (contextMatch(someClass) == FuzzyBoolean.YES);
}
 
Example #13
Source File: AspectJExpressionPointcut.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
public FuzzyBoolean matchesStatically(MatchingContext context) {
	return contextMatch(null);
}
 
Example #14
Source File: AspectJExpressionPointcut.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
@SuppressWarnings("rawtypes")
@Deprecated
public boolean couldMatchJoinPointsInType(Class someClass) {
	return (contextMatch(someClass) == FuzzyBoolean.YES);
}
 
Example #15
Source File: AspectJExpressionPointcut.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
@SuppressWarnings("rawtypes")
@Deprecated
public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) {
	return (contextMatch(someClass) == FuzzyBoolean.YES);
}
 
Example #16
Source File: AspectJExpressionPointcut.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public FuzzyBoolean matchesStatically(MatchingContext context) {
	return contextMatch(null);
}