Browse Source

Consistent public constructors in ast package

Issue: SPR-14181
pull/1037/head
Juergen Hoeller 10 years ago
parent
commit
e38bfb1a68
  1. 5
      spring-expression/src/main/java/org/springframework/expression/spel/ast/BooleanLiteral.java
  2. 6
      spring-expression/src/main/java/org/springframework/expression/spel/ast/FloatLiteral.java
  3. 6
      spring-expression/src/main/java/org/springframework/expression/spel/ast/IntLiteral.java
  4. 5
      spring-expression/src/main/java/org/springframework/expression/spel/ast/LongLiteral.java

5
spring-expression/src/main/java/org/springframework/expression/spel/ast/BooleanLiteral.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.expression.spel.ast;
import org.springframework.asm.MethodVisitor;
@ -20,7 +21,7 @@ import org.springframework.expression.spel.CodeFlow; @@ -20,7 +21,7 @@ import org.springframework.expression.spel.CodeFlow;
import org.springframework.expression.spel.support.BooleanTypedValue;
/**
* Represents the literal values TRUE and FALSE.
* Represents the literal values {@code TRUE} and {@code FALSE}.
*
* @author Andy Clement
* @since 3.0

6
spring-expression/src/main/java/org/springframework/expression/spel/ast/FloatLiteral.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -31,7 +31,8 @@ public class FloatLiteral extends Literal { @@ -31,7 +31,8 @@ public class FloatLiteral extends Literal {
private final TypedValue value;
FloatLiteral(String payload, int pos, float value) {
public FloatLiteral(String payload, int pos, float value) {
super(payload, pos);
this.value = new TypedValue(value);
this.exitTypeDescriptor = "F";
@ -53,4 +54,5 @@ public class FloatLiteral extends Literal { @@ -53,4 +54,5 @@ public class FloatLiteral extends Literal {
mv.visitLdcInsn(this.value.getValue());
cf.pushDescriptor(this.exitTypeDescriptor);
}
}

6
spring-expression/src/main/java/org/springframework/expression/spel/ast/IntLiteral.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.expression.spel.ast;
import org.springframework.asm.MethodVisitor;
@ -29,7 +30,8 @@ public class IntLiteral extends Literal { @@ -29,7 +30,8 @@ public class IntLiteral extends Literal {
private final TypedValue value;
IntLiteral(String payload, int pos, int value) {
public IntLiteral(String payload, int pos, int value) {
super(payload, pos);
this.value = new TypedValue(value);
this.exitTypeDescriptor = "I";

5
spring-expression/src/main/java/org/springframework/expression/spel/ast/LongLiteral.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -31,12 +31,13 @@ public class LongLiteral extends Literal { @@ -31,12 +31,13 @@ public class LongLiteral extends Literal {
private final TypedValue value;
LongLiteral(String payload, int pos, long value) {
public LongLiteral(String payload, int pos, long value) {
super(payload, pos);
this.value = new TypedValue(value);
this.exitTypeDescriptor = "J";
}
@Override
public TypedValue getLiteralValue() {
return this.value;

Loading…
Cancel
Save