Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

extend library to include runtime method/constructor resolution?

Abierto
#7 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
java
Área
backend

Línea de trabajo

Comienza con el punto de entrada propuesto dispatch(Object object, String methodname, Class<?> argTypes, Object[] args) y las reglas de Java Language Specification 15.12 que debe seguir. Investiga cómo java-classmate gestiona actualmente los métodos miembro y define el alcance y los criterios de finalización para subtyping, boxing/unboxing, varargs y generics antes de la implementación.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

I have this problem I'm trying to solve, namely that I'm doing runtime dispatch:

Object dispatch(Object object, String methodname, Class<?> argTypes, Object[] args);

where I need to lookup the matching public method(s) of object and if there's a single "most specific method" (in the JLS 15.12 sense) then I need to invoke it, otherwise I throw an error.

This is turning out to be rather difficult, and I was surprised that Java doesn't give you any help.

(I asked this question on StackOverflow: http://stackoverflow.com/questions/6021109/java-runtime-method-resolution
and one of the answerers referred me to java-classmate.)

It doesn't look like java-classmate presently helps accomplish this.

Would you be willing to include this in the scope of java-classmate? I have a rudimentary approach for resolving methods, it works OK for subtyping + boxing/unboxing, and I'm still stumbling with varargs, but I haven't even touched generics and that seems like the really hairy bit.

Lenguaje dominante
Java
Estrellas
266
Forks
47
Merge medio
1 h 42 min
PR fusionados (30 d)
1

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de FasterXML/java-classmate

Todos los issues de FasterXML/java-classmate

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.