mirror of
https://github.com/java-decompiler/jd-gui.git
synced 2025-02-18 11:17:39 +00:00
Updates API
This commit is contained in:
parent
dc7e03e5c2
commit
411348dc6b
@ -24,8 +24,6 @@ public interface Type {
|
||||
|
||||
public String getName();
|
||||
|
||||
public String getShortName();
|
||||
|
||||
public String getSuperName();
|
||||
|
||||
public String getOuterName();
|
||||
|
@ -9,6 +9,7 @@ import jd.gui.api.API;
|
||||
import jd.gui.api.model.Container;
|
||||
import jd.gui.api.model.Type;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public interface TypeFactory {
|
||||
@ -16,5 +17,15 @@ public interface TypeFactory {
|
||||
|
||||
public Pattern getPathPattern();
|
||||
|
||||
/**
|
||||
* @return all root types contains in 'entry'
|
||||
*/
|
||||
public Collection<Type> make(API api, Container.Entry entry);
|
||||
|
||||
/**
|
||||
* @param fragment @see jd.gui.api.feature.UriOpenable
|
||||
* @return if 'fragment' is null, return the main type in 'entry',
|
||||
* otherwise, return the type or sub-type matching with 'fragment'
|
||||
*/
|
||||
public Type make(API api, Container.Entry entry, String fragment);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ class UriUtil {
|
||||
* file://codebase/a/b/c/D$E.class => file://codebase/a/b/c/D.class#typeDeclaration=D$E
|
||||
*/
|
||||
static URI createURI(API api, Collection<Indexes> collectionOfIndexes, Container.Entry entry, String query, String fragment) {
|
||||
def type = TypeFactoryService.instance.get(entry)?.make(api, entry, null)
|
||||
def type = TypeFactoryService.instance.get(entry)?.make(api, entry, fragment)
|
||||
def uri = entry.uri
|
||||
def path = type?.outerName ? getOuterPath(collectionOfIndexes, entry, type) : uri.path
|
||||
return new URI(uri.scheme, uri.host, path, query, fragment)
|
||||
|
Loading…
x
Reference in New Issue
Block a user