Java源码示例:org.springframework.expression.TypeLocator

示例1
@Override
public TypeLocator getTypeLocator() {
	if (this.typeLocator == null) {
		this.typeLocator = new StandardTypeLocator();
	}
	return this.typeLocator;
}
 
示例2
@Test
public void testStandardEvaluationContext() {
	StandardEvaluationContext context = new StandardEvaluationContext();
	assertNotNull(context.getTypeComparator());

	TypeComparator tc = new StandardTypeComparator();
	context.setTypeComparator(tc);
	assertEquals(tc, context.getTypeComparator());

	TypeLocator tl = new StandardTypeLocator();
	context.setTypeLocator(tl);
	assertEquals(tl, context.getTypeLocator());
}
 
示例3
@Override
public TypeLocator getTypeLocator() {
	if (this.typeLocator == null) {
		this.typeLocator = new StandardTypeLocator();
	}
	return this.typeLocator;
}
 
示例4
@Test
public void testStandardEvaluationContext() {
	StandardEvaluationContext context = new StandardEvaluationContext();
	assertNotNull(context.getTypeComparator());

	TypeComparator tc = new StandardTypeComparator();
	context.setTypeComparator(tc);
	assertEquals(tc, context.getTypeComparator());

	TypeLocator tl = new StandardTypeLocator();
	context.setTypeLocator(tl);
	assertEquals(tl, context.getTypeLocator());
}
 
示例5
@Override
public TypeLocator getTypeLocator() {
	if (this.typeLocator == null) {
		this.typeLocator = new StandardTypeLocator();
	}
	return this.typeLocator;
}
 
示例6
@Override
public TypeLocator getTypeLocator() {
	if (this.typeLocator == null) {
		 this.typeLocator = new StandardTypeLocator();
	}
	return this.typeLocator;
}
 
示例7
@Test
public void testStandardEvaluationContext() {
	StandardEvaluationContext context = new StandardEvaluationContext();
	assertNotNull(context.getTypeComparator());

	TypeComparator tc = new StandardTypeComparator();
	context.setTypeComparator(tc);
	assertEquals(tc, context.getTypeComparator());

	TypeLocator tl = new StandardTypeLocator();
	context.setTypeLocator(tl);
	assertEquals(tl, context.getTypeLocator());
}
 
示例8
public void setTypeLocator(TypeLocator typeLocator) {
	Assert.notNull(typeLocator, "TypeLocator must not be null");
	this.typeLocator = typeLocator;
}
 
示例9
public void setTypeLocator(TypeLocator typeLocator) {
	Assert.notNull(typeLocator, "TypeLocator must not be null");
	this.typeLocator = typeLocator;
}
 
示例10
public void setTypeLocator(TypeLocator typeLocator) {
	Assert.notNull(typeLocator, "TypeLocator must not be null");
	this.typeLocator = typeLocator;
}
 
示例11
public void setTypeLocator(TypeLocator typeLocator) {
	Assert.notNull(typeLocator, "TypeLocator must not be null");
	this.typeLocator = typeLocator;
}
 
示例12
/**
 * {@code SimpleEvaluationContext} does not support use of type references.
 * @return {@code TypeLocator} implementation that raises a
 * {@link SpelEvaluationException} with {@link SpelMessage#TYPE_NOT_FOUND}.
 */
@Override
public TypeLocator getTypeLocator() {
	return typeNotFoundTypeLocator;
}
 
示例13
/**
 * {@code SimpleEvaluationContext} does not support use of type references.
 * @return {@code TypeLocator} implementation that raises a
 * {@link SpelEvaluationException} with {@link SpelMessage#TYPE_NOT_FOUND}.
 */
@Override
public TypeLocator getTypeLocator() {
	return typeNotFoundTypeLocator;
}