-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TypeDetails Object should be resolved if type Kind is CLASS
- Loading branch information
Showing
3 changed files
with
28 additions
and
8 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/main/java/org/hibernate/models/internal/IsBoundTypeSwitch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* Copyright: Red Hat Inc. and Hibernate Authors | ||
*/ | ||
package org.hibernate.models.internal; | ||
|
||
import java.util.Objects; | ||
|
||
import org.hibernate.models.spi.ClassDetails; | ||
import org.hibernate.models.spi.ClassTypeDetails; | ||
import org.hibernate.models.spi.SourceModelBuildingContext; | ||
|
||
public class IsBoundTypeSwitch extends IsResolvedTypeSwitch{ | ||
public static final IsBoundTypeSwitch IS_BOUND_SWITCH = new IsBoundTypeSwitch(); | ||
|
||
@Override | ||
public Boolean caseClass(ClassTypeDetails classType, SourceModelBuildingContext buildingContext) { | ||
// not completely kosher, but works for our needs | ||
return !Objects.equals( classType.getClassDetails(), ClassDetails.OBJECT_CLASS_DETAILS ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters