Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ArchetypeDataSourceDescriptor |
|
| 1.1428571428571428;1,143 | ||||
ArchetypeDataSourceDescriptor$Parameter |
|
| 1.1428571428571428;1,143 |
1 | package org.apache.maven.archetype.source; | |
2 | ||
3 | /* | |
4 | * Licensed to the Apache Software Foundation (ASF) under one | |
5 | * or more contributor license agreements. See the NOTICE file | |
6 | * distributed with this work for additional information | |
7 | * regarding copyright ownership. The ASF licenses this file | |
8 | * to you under the Apache License, Version 2.0 (the | |
9 | * "License"); you may not use this file except in compliance | |
10 | * with the License. You may obtain a copy of the License at | |
11 | * | |
12 | * http://www.apache.org/licenses/LICENSE-2.0 | |
13 | * | |
14 | * Unless required by applicable law or agreed to in writing, | |
15 | * software distributed under the License is distributed on an | |
16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
17 | * KIND, either express or implied. See the License for the | |
18 | * specific language governing permissions and limitations | |
19 | * under the License. | |
20 | */ | |
21 | ||
22 | import java.util.ArrayList; | |
23 | import java.util.List; | |
24 | ||
25 | /** @author Jason van Zyl */ | |
26 | 0 | public class ArchetypeDataSourceDescriptor |
27 | { | |
28 | private List parameters; | |
29 | ||
30 | public void addParameter( String name, Class type, String defaultValue, String description ) | |
31 | { | |
32 | 0 | addParameter( new Parameter( name, type, defaultValue, description ) ); |
33 | 0 | } |
34 | ||
35 | public void addParameter( Parameter parameter ) | |
36 | { | |
37 | 0 | if ( parameters == null ) |
38 | { | |
39 | 0 | parameters = new ArrayList(); |
40 | } | |
41 | ||
42 | 0 | parameters.add( parameter ); |
43 | 0 | } |
44 | ||
45 | 0 | public class Parameter |
46 | { | |
47 | public Parameter( String name, | |
48 | Class type, | |
49 | String defaultValue, | |
50 | String description ) | |
51 | 0 | { |
52 | 0 | this.name = name; |
53 | ||
54 | 0 | this.type = type; |
55 | ||
56 | 0 | this.defaultValue = defaultValue; |
57 | ||
58 | 0 | this.description = description; |
59 | ||
60 | 0 | } |
61 | ||
62 | private String name; | |
63 | ||
64 | private Class type; | |
65 | ||
66 | private String defaultValue; | |
67 | ||
68 | private String description; | |
69 | ||
70 | public Class getType() | |
71 | { | |
72 | 0 | return type; |
73 | } | |
74 | ||
75 | public String getDefaultValue() | |
76 | { | |
77 | 0 | return defaultValue; |
78 | } | |
79 | ||
80 | public String getName() | |
81 | { | |
82 | 0 | return name; |
83 | } | |
84 | ||
85 | public String getDescription() | |
86 | { | |
87 | 0 | return description; |
88 | } | |
89 | } | |
90 | } |