Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
sebersole committed Aug 27, 2024
1 parent 1e6022f commit 698a873
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public SourceModelBuildingContext produceContext(
}

private IndexView resolveJandexIndex(Map<Object, Object> configProperties) {
// todo : here is where we need to figure out the best way to have the Jandex Index to available
// todo : do we want to have the ability to create the Jandex index or resolve one from another source?
// - note: if building, be sure to apply BaseLineJavaTypes
return (IndexView) configProperties.get( INDEX_PARAM );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
import org.hibernate.models.spi.ClassDetailsRegistry;

/**
* Base set of classes used to prime the {@link ClassDetailsRegistry}
* and prime the Jandex {@link org.jboss.jandex.Indexer} (if we are creating the index).
* Base set of classes used to prime the {@link ClassDetailsRegistry}..
*
* @author Steve Ebersole
*/
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
/**
* Models a Java array type.
*
* @see org.jboss.jandex.ArrayType
*
* @author Steve Ebersole
*/
public interface ArrayTypeDetails extends ClassBasedTypeDetails {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* Models a class type.
*
* @see Class
* @see org.jboss.jandex.ClassType
*
* @author Steve Ebersole
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* </ol>
*
* @see java.lang.reflect.ParameterizedType
* @see org.jboss.jandex.ParameterizedType
*
* @author Steve Ebersole
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* Models a primitive type
*
* @see Class#isPrimitive
* @see org.jboss.jandex.PrimitiveType
*
* @author Steve Ebersole
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
/**
* Context object used while building references for {@link AnnotationDescriptor},
* {@link ClassDetails} and friends.
* <p/>
* Acts as the global {@linkplain SharedAnnotationScope}
*
* @author Steve Ebersole
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
package org.hibernate.models.spi;

/**
* Contract used in interpreting generics details.
*
* @author Steve Ebersole
*/
public interface TypeDetailsSwitch<T> {
/**
* Main entry into the generics interpretation, with delegation to the defined case methods
*/
static <T> T switchType(TypeDetails typeDetails, TypeDetailsSwitch<T> switcher, SourceModelBuildingContext buildingContext) {
switch( typeDetails.getTypeKind() ) {
case CLASS -> {
Expand Down Expand Up @@ -43,21 +48,48 @@ static <T> T switchType(TypeDetails typeDetails, TypeDetailsSwitch<T> switcher,
}
}

/**
* Handle the case of a raw class
*/
T caseClass(ClassTypeDetails classType, SourceModelBuildingContext buildingContext);

/**
* Handle the case of a primitive
*/
T casePrimitive(PrimitiveTypeDetails primitiveType, SourceModelBuildingContext buildingContext);

/**
* Handle the case of void (or Void)
*/
T caseVoid(VoidTypeDetails voidType, SourceModelBuildingContext buildingContext);

/**
* Handle the case of a parameterized type
*/
T caseParameterizedType(ParameterizedTypeDetails parameterizedType, SourceModelBuildingContext buildingContext);

/**
* Handle the case of a wildcard type
*/
T caseWildcardType(WildcardTypeDetails wildcardType, SourceModelBuildingContext buildingContext);

/**
* Handle the case of a type variable
*/
T caseTypeVariable(TypeVariableDetails typeVariable, SourceModelBuildingContext buildingContext);

/**
* Handle the case of a reference to a type variable
*/
T caseTypeVariableReference(TypeVariableReferenceDetails typeVariableReference, SourceModelBuildingContext buildingContext);

/**
* Handle the case of an array
*/
T caseArrayType(ArrayTypeDetails arrayType, SourceModelBuildingContext buildingContext);

/**
* Handle any other cases
*/
T defaultCase(TypeDetails type, SourceModelBuildingContext buildingContext);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* In this case, the identifier is {@code T}, while the name is {@code java.lang.Number}.
*
* @see java.lang.reflect.TypeVariable
* @see org.jboss.jandex.TypeVariable
*
* @author Steve Ebersole
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
* @apiNote This split between {@linkplain TypeVariableDetails} and {@linkplain TypeVariableReferenceDetails}
* helps protect against stack overflows while processing generics.
*
* @see org.jboss.jandex.TypeVariableReference
*
* @author Steve Ebersole
*/
public interface TypeVariableReferenceDetails extends TypeDetails {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/**
* Descriptor for the annotation attribute types, acting as a producer for
* {@link AttributeDescriptor}, {@link JandexValueConverter} and {@link JandexValueExtractor} references
* {@link AttributeDescriptor}, {@link JdkValueConverter} and {@link JdkValueExtractor} references
*
* @author Steve Ebersole
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* Models a wildcard type declaration.
*
* @see java.lang.reflect.WildcardType
* @see org.jboss.jandex.WildcardType
*
* @author Steve Ebersole
*/
Expand Down

0 comments on commit 698a873

Please sign in to comment.