-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SHRINKDESC-20] Allow empty contents for Descriptors on import.
Originally contributed by Andy Gibson in: https://github.com/andygibson/descriptors/commit/2a4bbd403dff44d91c5fa288549bdf0f1779ab2a Refactored by ALR to match current backing design
- Loading branch information
Andrew Lee Rubinger
committed
Mar 17, 2011
1 parent
8c1e732
commit e4ba790
Showing
6 changed files
with
162 additions
and
19 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
api/src/main/java/org/jboss/shrinkwrap/descriptor/api/ApiExposition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2011, Red Hat Middleware LLC, and individual contributors | ||
* by the @authors tag. See the copyright.txt in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.jboss.shrinkwrap.descriptor.api; | ||
|
||
/** | ||
* Indirection exposing some package-private methods | ||
* in the Descriptors API to the implementation classes. | ||
* | ||
* TO BE MOVED TO THE impl-base PACKAGE ONCE IT EXISTS; the user API | ||
* should NOT see this on the compilation ClassPath: SHRINKDESC-42 | ||
* | ||
* @author <a href="mailto:alr@jboss.org">Andrew Lee Rubinger</a> | ||
*/ | ||
// Mark as @Deprecated just to show that this will move | ||
@Deprecated | ||
public final class ApiExposition | ||
{ | ||
//-------------------------------------------------------------------------------------|| | ||
// Constructor ------------------------------------------------------------------------|| | ||
//-------------------------------------------------------------------------------------|| | ||
|
||
/** | ||
* No instances permitted | ||
*/ | ||
private ApiExposition() | ||
{ | ||
throw new UnsupportedOperationException("No instances permitted"); | ||
} | ||
|
||
//-------------------------------------------------------------------------------------|| | ||
// Functional Methods -----------------------------------------------------------------|| | ||
//-------------------------------------------------------------------------------------|| | ||
|
||
/** | ||
* Creates a {@link Descriptor} instance from the specified implementation | ||
* class name, also using the specified name | ||
* @param implClass | ||
* @param descriptorName | ||
* @return | ||
* @throws IllegalArgumentException If either argument is not specified | ||
*/ | ||
public static Descriptor createFromImplModelType(final Class<? extends Descriptor> implClass, String descriptorName) | ||
throws IllegalArgumentException | ||
{ | ||
return DescriptorInstantiator.createFromImplModelType(implClass, descriptorName); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.