Skip to content

Commit ce6f342

Browse files
committed
HV-1623 Rename a couple of classes to Abstract*
1 parent 3a1944c commit ce6f342

13 files changed

+28
-28
lines changed

engine/src/main/java/org/hibernate/validator/internal/cfg/context/PropertyConstraintMappingContextImpl.java renamed to engine/src/main/java/org/hibernate/validator/internal/cfg/context/AbstractPropertyConstraintMappingContextImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @author Kevin Pollet <kevin.pollet@serli.com> (C) 2011 SERLI
2929
* @author Marko Bekhta
3030
*/
31-
abstract class PropertyConstraintMappingContextImpl<T extends Property>
31+
abstract class AbstractPropertyConstraintMappingContextImpl<T extends Property>
3232
extends CascadableConstraintMappingContextImplBase<PropertyConstraintMappingContext>
3333
implements PropertyConstraintMappingContext {
3434

@@ -38,15 +38,15 @@ abstract class PropertyConstraintMappingContextImpl<T extends Property>
3838
private final T property;
3939
private final ConstraintLocation location;
4040

41-
protected PropertyConstraintMappingContextImpl(TypeConstraintMappingContextImpl<?> typeContext, T property, ConstraintLocation location) {
41+
protected AbstractPropertyConstraintMappingContextImpl(TypeConstraintMappingContextImpl<?> typeContext, T property, ConstraintLocation location) {
4242
super( typeContext.getConstraintMapping(), property.getType() );
4343
this.typeContext = typeContext;
4444
this.property = property;
4545
this.location = location;
4646
}
4747

4848
@Override
49-
protected PropertyConstraintMappingContextImpl getThis() {
49+
protected AbstractPropertyConstraintMappingContextImpl getThis() {
5050
return this;
5151
}
5252

engine/src/main/java/org/hibernate/validator/internal/cfg/context/FieldConstraintMappingContextImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
import org.hibernate.validator.internal.util.TypeResolutionHelper;
2020

2121
/**
22-
* An implementation of {@link PropertyConstraintMappingContextImpl} for a field property.
22+
* An implementation of {@link AbstractPropertyConstraintMappingContextImpl} for a field property.
2323
* Represents a constraint mapping creational context which allows to configure the constraints
2424
* for one of the bean's field properties.
2525
*
2626
* @author Marko Bekhta
2727
*/
28-
final class FieldConstraintMappingContextImpl extends PropertyConstraintMappingContextImpl<JavaBeanField> {
28+
final class FieldConstraintMappingContextImpl extends AbstractPropertyConstraintMappingContextImpl<JavaBeanField> {
2929

3030
FieldConstraintMappingContextImpl(TypeConstraintMappingContextImpl<?> typeContext, JavaBeanField javaBeanField) {
3131
super( typeContext, javaBeanField, ConstraintLocation.forField( javaBeanField ) );

engine/src/main/java/org/hibernate/validator/internal/cfg/context/GetterConstraintMappingContextImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
import org.hibernate.validator.internal.util.TypeResolutionHelper;
1919

2020
/**
21-
* An implementation of {@link PropertyConstraintMappingContextImpl} for a getter property.
21+
* An implementation of {@link AbstractPropertyConstraintMappingContextImpl} for a getter property.
2222
* Represents a constraint mapping creational context which allows to configure the constraints
2323
* for one of the bean's getter properties.
2424
*
2525
* @author Marko Bekhta
2626
*/
27-
final class GetterConstraintMappingContextImpl extends PropertyConstraintMappingContextImpl<JavaBeanGetter> {
27+
final class GetterConstraintMappingContextImpl extends AbstractPropertyConstraintMappingContextImpl<JavaBeanGetter> {
2828

2929
GetterConstraintMappingContextImpl(TypeConstraintMappingContextImpl<?> typeContext, JavaBeanGetter javaBeanGetter) {
3030
super( typeContext, javaBeanGetter, ConstraintLocation.forGetter( javaBeanGetter ) );

engine/src/main/java/org/hibernate/validator/internal/cfg/context/TypeConstraintMappingContextImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public final class TypeConstraintMappingContextImpl<C> extends ConstraintMapping
6969
private final Class<C> beanClass;
7070

7171
private final Set<ExecutableConstraintMappingContextImpl> executableContexts = newHashSet();
72-
private final Set<PropertyConstraintMappingContextImpl> propertyContexts = newHashSet();
72+
private final Set<AbstractPropertyConstraintMappingContextImpl> propertyContexts = newHashSet();
7373
private final Set<Constrainable> configuredMembers = newHashSet();
7474

7575
private List<Class<?>> defaultGroupSequence;
@@ -146,7 +146,7 @@ public PropertyConstraintMappingContext field(String property) {
146146
throw LOG.getPropertyHasAlreadyBeConfiguredViaProgrammaticApiException( beanClass, property );
147147
}
148148

149-
PropertyConstraintMappingContextImpl context = new FieldConstraintMappingContextImpl( this, javaBeanField );
149+
AbstractPropertyConstraintMappingContextImpl context = new FieldConstraintMappingContextImpl( this, javaBeanField );
150150
configuredMembers.add( javaBeanField );
151151
propertyContexts.add( context );
152152
return context;
@@ -166,7 +166,7 @@ public PropertyConstraintMappingContext getter(String property) {
166166
throw LOG.getPropertyHasAlreadyBeConfiguredViaProgrammaticApiException( beanClass, property );
167167
}
168168

169-
PropertyConstraintMappingContextImpl context = new GetterConstraintMappingContextImpl( this, javaBeanGetter );
169+
AbstractPropertyConstraintMappingContextImpl context = new GetterConstraintMappingContextImpl( this, javaBeanGetter );
170170
configuredMembers.add( javaBeanGetter );
171171
propertyContexts.add( context );
172172
return context;
@@ -258,7 +258,7 @@ private Set<ConstrainedElement> buildConstraintElements(ConstraintHelper constra
258258
}
259259

260260
//properties
261-
for ( PropertyConstraintMappingContextImpl propertyContext : propertyContexts ) {
261+
for ( AbstractPropertyConstraintMappingContextImpl propertyContext : propertyContexts ) {
262262
elements.add( propertyContext.build( constraintHelper, typeResolutionHelper, valueExtractorManager ) );
263263
}
264264

engine/src/main/java/org/hibernate/validator/internal/engine/validationcontext/PropertyValidationContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.hibernate.validator.internal.metadata.aggregated.BeanMetaData;
2424
import org.hibernate.validator.internal.metadata.core.MetaConstraint;
2525
import org.hibernate.validator.internal.metadata.location.ConstraintLocation;
26-
import org.hibernate.validator.internal.metadata.location.PropertyConstraintLocation;
26+
import org.hibernate.validator.internal.metadata.location.AbstractPropertyConstraintLocation;
2727
import org.hibernate.validator.internal.metadata.location.TypeArgumentConstraintLocation;
2828

2929
/**
@@ -71,8 +71,8 @@ private String getPropertyName(ConstraintLocation location) {
7171
location = ( (TypeArgumentConstraintLocation) location ).getOuterDelegate();
7272
}
7373

74-
if ( location instanceof PropertyConstraintLocation ) {
75-
return ( (PropertyConstraintLocation) location ).getPropertyName();
74+
if ( location instanceof AbstractPropertyConstraintLocation ) {
75+
return ( (AbstractPropertyConstraintLocation) location ).getPropertyName();
7676
}
7777

7878
return null;

engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/PropertyCascadable.java renamed to engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/AbstractPropertyCascadable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
import org.hibernate.validator.internal.properties.Property;
1616

1717
/**
18-
* A {@link Cascadable} backed by a field of a Java bean.
18+
* A {@link Cascadable} backed by a property of a Java bean.
1919
*
2020
* @author Gunnar Morling
2121
* @author Marko Bekhta
2222
*/
23-
public abstract class PropertyCascadable implements Cascadable {
23+
public abstract class AbstractPropertyCascadable implements Cascadable {
2424

2525
private final Property property;
2626
private final Type cascadableType;
2727
private final CascadingMetaData cascadingMetaData;
2828

29-
PropertyCascadable(Property property, CascadingMetaData cascadingMetaData) {
29+
AbstractPropertyCascadable(Property property, CascadingMetaData cascadingMetaData) {
3030
this.property = property;
3131
this.cascadableType = property.getType();
3232
this.cascadingMetaData = cascadingMetaData;

engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/FieldCascadable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* @author Gunnar Morling
1818
* @author Marko Bekhta
1919
*/
20-
public class FieldCascadable extends PropertyCascadable {
20+
public class FieldCascadable extends AbstractPropertyCascadable {
2121

2222
FieldCascadable(Property property, CascadingMetaData cascadingMetaData) {
2323
super( property, cascadingMetaData );
@@ -28,7 +28,7 @@ public ConstraintLocationKind getConstraintLocationKind() {
2828
return ConstraintLocationKind.FIELD;
2929
}
3030

31-
public static class Builder extends PropertyCascadable.Builder {
31+
public static class Builder extends AbstractPropertyCascadable.Builder {
3232

3333
protected Builder(ValueExtractorManager valueExtractorManager, Property property, CascadingMetaDataBuilder cascadingMetaDataBuilder) {
3434
super( valueExtractorManager, property, cascadingMetaDataBuilder );

engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/GetterCascadable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* @author Gunnar Morling
1818
* @author Marko Bekhta
1919
*/
20-
public class GetterCascadable extends PropertyCascadable {
20+
public class GetterCascadable extends AbstractPropertyCascadable {
2121

2222
GetterCascadable(Property property, CascadingMetaData cascadingMetaData) {
2323
super( property, cascadingMetaData );
@@ -28,7 +28,7 @@ public ConstraintLocationKind getConstraintLocationKind() {
2828
return ConstraintLocationKind.GETTER;
2929
}
3030

31-
public static class Builder extends PropertyCascadable.Builder {
31+
public static class Builder extends AbstractPropertyCascadable.Builder {
3232

3333
protected Builder(ValueExtractorManager valueExtractorManager, Property property, CascadingMetaDataBuilder cascadingMetaDataBuilder) {
3434
super( valueExtractorManager, property, cascadingMetaDataBuilder );

engine/src/main/java/org/hibernate/validator/internal/metadata/aggregated/PropertyMetaData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public final void add(ConstrainedElement constrainedElement) {
198198
Property property = constrainable.get().as( Property.class );
199199
Cascadable.Builder builder = cascadableBuilders.get( property );
200200
if ( builder == null ) {
201-
builder = PropertyCascadable.Builder.builder( constrainedElement.getKind(), valueExtractorManager, property, constrainedElement.getCascadingMetaDataBuilder() );
201+
builder = AbstractPropertyCascadable.Builder.builder( constrainedElement.getKind(), valueExtractorManager, property, constrainedElement.getCascadingMetaDataBuilder() );
202202
cascadableBuilders.put( property, builder );
203203
}
204204
else {

engine/src/main/java/org/hibernate/validator/internal/metadata/location/PropertyConstraintLocation.java renamed to engine/src/main/java/org/hibernate/validator/internal/metadata/location/AbstractPropertyConstraintLocation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
* @author Marko Bekhta
1919
* @author Guillaume Smet
2020
*/
21-
public abstract class PropertyConstraintLocation implements ConstraintLocation {
21+
public abstract class AbstractPropertyConstraintLocation implements ConstraintLocation {
2222

2323
/**
2424
* The member the constraint was defined on.
2525
*/
2626
private final Property property;
2727

28-
PropertyConstraintLocation(Property property) {
28+
AbstractPropertyConstraintLocation(Property property) {
2929
this.property = property;
3030
}
3131

@@ -72,7 +72,7 @@ public boolean equals(Object o) {
7272
return false;
7373
}
7474

75-
PropertyConstraintLocation that = (PropertyConstraintLocation) o;
75+
AbstractPropertyConstraintLocation that = (AbstractPropertyConstraintLocation) o;
7676

7777
if ( !property.equals( that.property ) ) {
7878
return false;

engine/src/main/java/org/hibernate/validator/internal/metadata/location/ConstraintLocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static ConstraintLocation forParameter(Callable callable, int index) {
9494

9595
/**
9696
* Obtains the value of this location from the parent. The type of the passed parent depends on the location type,
97-
* e.g. a bean would be passed for a {@link PropertyConstraintLocation} but an
97+
* e.g. a bean would be passed for a {@link AbstractPropertyConstraintLocation} but an
9898
* object array for a {@link ParameterConstraintLocation}.
9999
*/
100100
Object getValue(Object parent);

engine/src/main/java/org/hibernate/validator/internal/metadata/location/FieldConstraintLocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @author Marko Bekhta
1515
*/
16-
public class FieldConstraintLocation extends PropertyConstraintLocation {
16+
public class FieldConstraintLocation extends AbstractPropertyConstraintLocation {
1717

1818
FieldConstraintLocation(Property field) {
1919
super( field );

engine/src/main/java/org/hibernate/validator/internal/metadata/location/GetterConstraintLocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @author Marko Bekhta
1515
*/
16-
public class GetterConstraintLocation extends PropertyConstraintLocation {
16+
public class GetterConstraintLocation extends AbstractPropertyConstraintLocation {
1717

1818
GetterConstraintLocation(Property getter) {
1919
super( getter );

0 commit comments

Comments
 (0)