update copyright
[fedora-idea.git] / java / idea-ui / src / com / intellij / facet / impl / autodetecting / model / DetectedFacetInfoImpl.java
blobb0e825265f386215d13427dc33245ac74eb82cb2
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.facet.impl.autodetecting.model;
18 import com.intellij.facet.FacetConfiguration;
19 import com.intellij.facet.FacetType;
20 import org.jetbrains.annotations.NotNull;
21 import org.jetbrains.annotations.Nullable;
23 import java.util.ArrayList;
24 import java.util.Collection;
26 /**
27 * @author nik
29 public class DetectedFacetInfoImpl<M> implements DetectedFacetInfo<M> {
30 private final String myFacetName;
31 private final FacetConfiguration myConfiguration;
32 private final FacetType<?,?> myFacetType;
33 private final FacetInfo2<M> myUnderlyingFacetInfo;
34 private final M myModule;
35 private final Collection<String> myUrls;
36 private final int myId;
37 private final String myDetectorId;
39 public DetectedFacetInfoImpl(final @NotNull String facetName, final @NotNull FacetConfiguration configuration, final @NotNull FacetType<?, ?> facetType,
40 final @NotNull M module,
41 final @Nullable FacetInfo2<M> underlyingFacetInfo,
42 final String url,
43 final int id,
44 final String detectorId) {
45 myFacetName = facetName;
46 myConfiguration = configuration;
47 myFacetType = facetType;
48 myModule = module;
49 myUnderlyingFacetInfo = underlyingFacetInfo;
50 myId = id;
51 myDetectorId = detectorId;
52 myUrls = new ArrayList<String>();
53 myUrls.add(url);
56 @NotNull
57 public String getFacetName() {
58 return myFacetName;
61 @NotNull
62 public FacetConfiguration getConfiguration() {
63 return myConfiguration;
66 @NotNull
67 public FacetType<?,?> getFacetType() {
68 return myFacetType;
71 public FacetInfo2<M> getUnderlyingFacetInfo() {
72 return myUnderlyingFacetInfo;
75 @NotNull
76 public M getModule() {
77 return myModule;
80 public int getId() {
81 return myId;
84 public String getDetectorId() {
85 return myDetectorId;