~ubuntu-branches/ubuntu/saucy/ivy/saucy-proposed

« back to all changes in this revision

Viewing changes to src/java/org/apache/ivy/core/module/descriptor/DefaultExtendsDescriptor.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2013-05-15 17:44:57 UTC
  • mfrom: (3.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130515174457-ogntd0vxluwalq11
Tags: 2.3.0-2
* Team upload.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
public class DefaultExtendsDescriptor implements ExtendsDescriptor {
26
26
 
27
 
    private ModuleRevisionId parentRevisionId;
28
 
    private ModuleRevisionId resolvedParentRevisionId;
 
27
    private ModuleDescriptor parent;
29
28
    private String location;
30
29
    private List extendsTypes;
 
30
    private boolean local;
31
31
 
32
 
    public DefaultExtendsDescriptor(ModuleRevisionId parentRevisionId,
33
 
                                    ModuleRevisionId resolvedParentRevisionId,
34
 
                                    String location, String[] types) {
35
 
        this.parentRevisionId = parentRevisionId;
36
 
        this.resolvedParentRevisionId = resolvedParentRevisionId;
 
32
    public DefaultExtendsDescriptor(ModuleDescriptor parent,
 
33
            String location, String[] types) {
 
34
        this(parent, location, types, false);
 
35
    }
 
36
    
 
37
    public DefaultExtendsDescriptor(ModuleDescriptor parent,
 
38
                                    String location, String[] types, 
 
39
                                    boolean local) {
 
40
        this.parent = parent;
37
41
        this.location = location;
 
42
        this.local = local;
38
43
        this.extendsTypes = new ArrayList(types.length);
39
44
        for (int i = 0; i < types.length; ++i) {
40
45
            extendsTypes.add(types[i]);
42
47
    }
43
48
 
44
49
    public ModuleRevisionId getParentRevisionId() {
45
 
        return parentRevisionId;
 
50
        return parent.getModuleRevisionId();
46
51
    }
47
52
 
48
53
    public ModuleRevisionId getResolvedParentRevisionId() {
49
 
        return resolvedParentRevisionId;
 
54
        return parent.getResolvedModuleRevisionId();
 
55
    }
 
56
    
 
57
    public ModuleDescriptor getParentMd() {
 
58
        return parent;
50
59
    }
51
60
 
52
61
    public String getLocation() {
76
85
    public boolean areDependenciesInherited() {
77
86
        return isAllInherited() || extendsTypes.contains("dependencies");
78
87
    }
 
88
    
 
89
    public boolean isLocal() {
 
90
        return local;
 
91
    }
79
92
}