blob: f72a18d5ce65b8a12c569dbe475e75a48b942976 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.component.chain.dependencies.ordering;
/**
* A phase providing a given name.
*
* @author tonytv
*/
class PhaseNameProvider extends NameProvider {
public PhaseNameProvider(String name, int priority) {
super(name,priority);
}
protected void addNode(ComponentNode<?> newNode) {
throw new ConflictingNodeTypeException("Both a phase and a searcher provides the name '" + name + "'");
}
@Override
public String toString() {
return getClass().getSimpleName() + "[name = " + name + "]";
}
@Override
int classPriority() {
return 0;
}
}
|