Record Class Hierarchy
java.lang.Object
java.lang.Record
net.neoforged.javadoctor.collector.util.Hierarchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.findChildrenOfType(Element parent, ElementKind kind) findField(TypeElement type, String fieldName, String fieldDesc) findMethod(TypeElement type, String methodName, String methodDesc, boolean allowConstructors) static TypeElementgetTopLevel(TypeElement clazz) final inthashCode()Returns a hash code value for this object.names()Returns the value of thenamesrecord component.onAllChildren(TypeElement type) final StringtoString()Returns a string representation of this record class.types()Returns the value of thetypesrecord component.static Stream<TypeElement>walkChildren(TypeElement clazz) static Stream<TypeElement>walkEnclosingClasses(TypeElement clazz)
-
Constructor Details
-
Hierarchy
Creates an instance of aHierarchyrecord class.- Parameters:
types- the value for thetypesrecord componentnames- the value for thenamesrecord component
-
-
Method Details
-
onAllChildren
-
findMethod
public Optional<ExecutableElement> findMethod(TypeElement type, String methodName, String methodDesc, boolean allowConstructors) -
findField
-
findChildrenOfType
-
walkEnclosingClasses
-
walkChildren
-
getTopLevel
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
types
Returns the value of thetypesrecord component.- Returns:
- the value of the
typesrecord component
-
names
Returns the value of thenamesrecord component.- Returns:
- the value of the
namesrecord component
-