Java Code Examples for org.aspectj.weaver.reflect.ReflectionVar

The following examples show how to use org.aspectj.weaver.reflect.ReflectionVar. These examples are extracted from open source projects. 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 Project: spring-analysis-note   Source File: RuntimeTestWalker.java    License: MIT License 5 votes vote down vote up
protected int getVarType(ReflectionVar v) {
	try {
		ReflectionUtils.makeAccessible(varTypeField);
		return (Integer) varTypeField.get(v);
	}
	catch (IllegalAccessException ex) {
		throw new IllegalStateException(ex);
	}
}
 
Example 2
Source Project: spring-analysis-note   Source File: RuntimeTestWalker.java    License: MIT License 5 votes vote down vote up
@Override
public void visit(Instanceof i) {
	ReflectionVar v = (ReflectionVar) i.getVar();
	Object varUnderTest = v.getBindingAtJoinPoint(this.thisObj, this.targetObj, this.argsObjs);
	if (varUnderTest == this.thisObj || varUnderTest == this.targetObj) {
		this.testsSubtypeSensitiveVars = true;
	}
}
 
Example 3
Source Project: spring-analysis-note   Source File: RuntimeTestWalker.java    License: MIT License 5 votes vote down vote up
@Override
public void visit(HasAnnotation hasAnn) {
	// If you thought things were bad before, now we sink to new levels of horror...
	ReflectionVar v = (ReflectionVar) hasAnn.getVar();
	int varType = getVarType(v);
	if (varType == AT_THIS_VAR || varType == AT_TARGET_VAR || varType == AT_ANNOTATION_VAR) {
		this.testsSubtypeSensitiveVars = true;
	}
}
 
Example 4
Source Project: java-technology-stack   Source File: RuntimeTestWalker.java    License: MIT License 5 votes vote down vote up
protected int getVarType(ReflectionVar v) {
	try {
		ReflectionUtils.makeAccessible(varTypeField);
		return (Integer) varTypeField.get(v);
	}
	catch (IllegalAccessException ex) {
		throw new IllegalStateException(ex);
	}
}
 
Example 5
Source Project: java-technology-stack   Source File: RuntimeTestWalker.java    License: MIT License 5 votes vote down vote up
@Override
public void visit(Instanceof i) {
	ReflectionVar v = (ReflectionVar) i.getVar();
	Object varUnderTest = v.getBindingAtJoinPoint(this.thisObj, this.targetObj, this.argsObjs);
	if (varUnderTest == this.thisObj || varUnderTest == this.targetObj) {
		this.testsSubtypeSensitiveVars = true;
	}
}
 
Example 6
Source Project: java-technology-stack   Source File: RuntimeTestWalker.java    License: MIT License 5 votes vote down vote up
@Override
public void visit(HasAnnotation hasAnn) {
	// If you thought things were bad before, now we sink to new levels of horror...
	ReflectionVar v = (ReflectionVar) hasAnn.getVar();
	int varType = getVarType(v);
	if (varType == AT_THIS_VAR || varType == AT_TARGET_VAR || varType == AT_ANNOTATION_VAR) {
		this.testsSubtypeSensitiveVars = true;
	}
}
 
Example 7
Source Project: lams   Source File: RuntimeTestWalker.java    License: GNU General Public License v2.0 5 votes vote down vote up
protected int getVarType(ReflectionVar v) {
	try {
		ReflectionUtils.makeAccessible(varTypeField);
		return (Integer) varTypeField.get(v);
	}
	catch (IllegalAccessException ex) {
		throw new IllegalStateException(ex);
	}
}
 
Example 8
Source Project: lams   Source File: RuntimeTestWalker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visit(Instanceof i) {
	ReflectionVar v = (ReflectionVar) i.getVar();
	Object varUnderTest = v.getBindingAtJoinPoint(this.thisObj, this.targetObj, this.argsObjs);
	if (varUnderTest == this.thisObj || varUnderTest == this.targetObj) {
		this.testsSubtypeSensitiveVars = true;
	}
}
 
Example 9
Source Project: lams   Source File: RuntimeTestWalker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visit(HasAnnotation hasAnn) {
	// If you thought things were bad before, now we sink to new levels of horror...
	ReflectionVar v = (ReflectionVar) hasAnn.getVar();
	int varType = getVarType(v);
	if (varType == AT_THIS_VAR || varType == AT_TARGET_VAR || varType == AT_ANNOTATION_VAR) {
		this.testsSubtypeSensitiveVars = true;
	}
}
 
Example 10
Source Project: spring4-understanding   Source File: RuntimeTestWalker.java    License: Apache License 2.0 5 votes vote down vote up
protected int getVarType(ReflectionVar v) {
	try {
		ReflectionUtils.makeAccessible(varTypeField);
		return (Integer) varTypeField.get(v);
	}
	catch (IllegalAccessException ex) {
		throw new IllegalStateException(ex);
	}
}
 
Example 11
Source Project: spring4-understanding   Source File: RuntimeTestWalker.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void visit(Instanceof i) {
	ReflectionVar v = (ReflectionVar) i.getVar();
	Object varUnderTest = v.getBindingAtJoinPoint(this.thisObj, this.targetObj, this.argsObjs);
	if (varUnderTest == this.thisObj || varUnderTest == this.targetObj) {
		this.testsSubtypeSensitiveVars = true;
	}
}
 
Example 12
Source Project: spring4-understanding   Source File: RuntimeTestWalker.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void visit(HasAnnotation hasAnn) {
	// If you thought things were bad before, now we sink to new levels of horror...
	ReflectionVar v = (ReflectionVar) hasAnn.getVar();
	int varType = getVarType(v);
	if (varType == AT_THIS_VAR || varType == AT_TARGET_VAR || varType == AT_ANNOTATION_VAR) {
		this.testsSubtypeSensitiveVars = true;
	}
}