Revision 374 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/library/AbstractLibrary.java
AbstractLibrary.java | ||
---|---|---|
92 | 92 |
* @param type the library type. See {@link TYPE}. |
93 | 93 |
*/ |
94 | 94 |
protected AbstractLibrary(Class library, String type) { |
95 |
if (!Library.class.isAssignableFrom(library)) { |
|
96 |
throw new IllegalArgumentException("Given class is not a Library: " |
|
97 |
+ library); |
|
98 |
} |
|
99 | 95 |
this.library = library; |
100 | 96 |
this.type = type; |
101 |
if( this.type != null && this.library!= null ) { |
|
102 |
if( this.type != Library.TYPE.API) { |
|
97 |
if( this.library!= null ) { |
|
98 |
if (!Library.class.isAssignableFrom(library)) { |
|
99 |
throw new IllegalArgumentException("Given class is not a Library: " |
|
100 |
+ library); |
|
101 |
} |
|
102 |
if( this.type != null && this.type != Library.TYPE.API) { |
|
103 | 103 |
require(this.library, Library.TYPE.API); |
104 | 104 |
} |
105 | 105 |
} |
Also available in: Unified diff