FasterXML / FasterXML/java-classmate

extend library to include runtime method/constructor resolution?

Aberta
#7 4 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Java
Estrelas
266
Forks
47
Merge médio
1h 42min
PRs com merge (30d)
1

Descrição

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.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Comece pelo ponto de entrada proposto dispatch(Object object, String methodname, Class argTypes, Object[] args) e pelas regras da Java Language Specification 15.12 que ele deve seguir. Pesquise como java-classmate atualmente lida com métodos membros e defina o escopo e os critérios de conclusão para subtyping, boxing/unboxing, varargs e generics antes da implementação.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
java
Domínio
backend
Tipo de issue
Funcionalidade
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.