Skip to content

Conversation

@mp911de
Copy link
Member

@mp911de mp911de commented Sep 11, 2025

Add opinionated builders for return statements and invocations, add introspection type for MethodReturns to reduce checks for e.g. Optional and void and utilities to construct type names.

Add opinionated builders for return statements and invocations, add introspection type for MethodReturns to reduce checks for e.g. `Optional` and `void` and utilities to construct type names.
@mp911de mp911de added this to the 4.0 M6 (2025.1.0) milestone Sep 11, 2025
@mp911de mp911de added the type: enhancement A general enhancement label Sep 11, 2025
public static TypeName className(ResolvableType resolvableType) {
return TypeName.get(resolvableType.toClass());
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also have a parameterized variant?

static TypeName parameterizedClassName(ResolvableType resolvableType) {

	if (!resolvableType.hasResolvableGenerics()) {
		return typeName(resolvableType);
	}
	return ParameterizedTypeName.get(type.toClass(), type.resolveGenerics());
}

@mp911de mp911de added the theme: aot An issue related to Ahead-Of-Time processing label Sep 11, 2025
Add tests, refine API contracts and reflect it in the documentation, remove methods that seem useful but are rather polluting the API.
christophstrobl pushed a commit that referenced this pull request Sep 11, 2025
Add tests, refine API contracts and reflect it in the documentation, remove methods that seem useful but are rather polluting the API.

Original Pull Request: #3357
christophstrobl added a commit that referenced this pull request Sep 11, 2025
Original Pull Request: #3357
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme: aot An issue related to Ahead-Of-Time processing type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants