Skip to content

Commit 4be22c4

Browse files
committed
Consistent public constructors in ast package
Issue: SPR-14181 (cherry picked from commit e38bfb1)
1 parent 9438c41 commit 4be22c4

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,14 +13,15 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.expression.spel.ast;
1718

1819
import org.springframework.asm.MethodVisitor;
1920
import org.springframework.expression.spel.CodeFlow;
2021
import org.springframework.expression.spel.support.BooleanTypedValue;
2122

2223
/**
23-
* Represents the literal values TRUE and FALSE.
24+
* Represents the literal values {@code TRUE} and {@code FALSE}.
2425
*
2526
* @author Andy Clement
2627
* @since 3.0

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,7 +31,8 @@ public class FloatLiteral extends Literal {
3131

3232
private final TypedValue value;
3333

34-
FloatLiteral(String payload, int pos, float value) {
34+
35+
public FloatLiteral(String payload, int pos, float value) {
3536
super(payload, pos);
3637
this.value = new TypedValue(value);
3738
this.exitTypeDescriptor = "F";
@@ -53,4 +54,5 @@ public void generateCode(MethodVisitor mv, CodeFlow cf) {
5354
mv.visitLdcInsn(this.value.getValue());
5455
cf.pushDescriptor(this.exitTypeDescriptor);
5556
}
57+
5658
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.expression.spel.ast;
1718

1819
import org.springframework.asm.MethodVisitor;
@@ -29,7 +30,8 @@ public class IntLiteral extends Literal {
2930

3031
private final TypedValue value;
3132

32-
IntLiteral(String payload, int pos, int value) {
33+
34+
public IntLiteral(String payload, int pos, int value) {
3335
super(payload, pos);
3436
this.value = new TypedValue(value);
3537
this.exitTypeDescriptor = "I";

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,12 +31,13 @@ public class LongLiteral extends Literal {
3131
private final TypedValue value;
3232

3333

34-
LongLiteral(String payload, int pos, long value) {
34+
public LongLiteral(String payload, int pos, long value) {
3535
super(payload, pos);
3636
this.value = new TypedValue(value);
3737
this.exitTypeDescriptor = "J";
3838
}
3939

40+
4041
@Override
4142
public TypedValue getLiteralValue() {
4243
return this.value;

0 commit comments

Comments
 (0)