Skip to main content
summaryrefslogtreecommitdiffstats
blob: c7e795d6a9d15833e9699f45e14d2c1f2803fdae (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*******************************************************************************
 * Copyright (c) 2011, 2013 Oracle. All rights reserved.
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0, which accompanies this distribution
 * and is available at http://www.eclipse.org/legal/epl-v10.html.
 * 
 * Contributors:
 *     Oracle - initial API and implementation
 ******************************************************************************/
package org.eclipse.jpt.jaxb.core.resource.jaxbindex;

import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jpt.common.core.JptResourceModel;
import org.eclipse.jpt.common.core.JptResourceType;
import org.eclipse.jpt.common.core.internal.utility.ContentTypeTools;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerAdapter;
import org.eclipse.jpt.common.utility.transformer.Transformer;
import org.eclipse.jpt.jaxb.core.internal.plugin.JptJaxbCorePlugin;

public interface JaxbIndexResource
		extends JptResourceModel {
	
	/**
	 * The content type for <code>jaxb.index</code> files.
	 */
	IContentType CONTENT_TYPE = JptJaxbCorePlugin.instance().getContentType("jaxbIndex"); //$NON-NLS-1$

	/**
	 * The resource type for <code>jaxb.index</code> files.
	 */
	JptResourceType RESOURCE_TYPE = ContentTypeTools.getResourceType(CONTENT_TYPE);

	String getPackageName();
	
	Iterable<String> getFullyQualifiedClassNames();
	Transformer<JaxbIndexResource, Iterable<String>> CLASS_NAMES_TRANSFORMER = new ClassNamesTransformer();
	class ClassNamesTransformer
		extends TransformerAdapter<JaxbIndexResource, Iterable<String>>
	{
		@Override
		public Iterable<String> transform(JaxbIndexResource jaxbIndexResource) {
			return jaxbIndexResource.getFullyQualifiedClassNames();
		}
	}
}

Back to the top