Updates API
emmanue1
8 years ago
22 | 22 |
public int getFlags();
|
23 | 23 |
|
24 | 24 |
public String getName();
|
25 | |
|
26 | |
public String getShortName();
|
27 | 25 |
|
28 | 26 |
public String getSuperName();
|
29 | 27 |
|
8 | 8 |
import jd.gui.api.model.Container;
|
9 | 9 |
import jd.gui.api.model.Type;
|
10 | 10 |
|
|
11 |
import java.util.Collection;
|
11 | 12 |
import java.util.regex.Pattern;
|
12 | 13 |
|
13 | 14 |
public interface TypeFactory {
|
|
15 | 16 |
|
16 | 17 |
public Pattern getPathPattern();
|
17 | 18 |
|
|
19 |
/**
|
|
20 |
* @return all root types contains in 'entry'
|
|
21 |
*/
|
|
22 |
public Collection<Type> make(API api, Container.Entry entry);
|
|
23 |
|
|
24 |
/**
|
|
25 |
* @param fragment @see jd.gui.api.feature.UriOpenable
|
|
26 |
* @return if 'fragment' is null, return the main type in 'entry',
|
|
27 |
* otherwise, return the type or sub-type matching with 'fragment'
|
|
28 |
*/
|
18 | 29 |
public Type make(API api, Container.Entry entry, String fragment);
|
19 | 30 |
}
|
17 | 17 |
* file://codebase/a/b/c/D$E.class => file://codebase/a/b/c/D.class#typeDeclaration=D$E
|
18 | 18 |
*/
|
19 | 19 |
static URI createURI(API api, Collection<Indexes> collectionOfIndexes, Container.Entry entry, String query, String fragment) {
|
20 | |
def type = TypeFactoryService.instance.get(entry)?.make(api, entry, null)
|
|
20 |
def type = TypeFactoryService.instance.get(entry)?.make(api, entry, fragment)
|
21 | 21 |
def uri = entry.uri
|
22 | 22 |
def path = type?.outerName ? getOuterPath(collectionOfIndexes, entry, type) : uri.path
|
23 | 23 |
return new URI(uri.scheme, uri.host, path, query, fragment)
|