Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/DeclarationsContributor.java')
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/DeclarationsContributor.java49
1 files changed, 49 insertions, 0 deletions
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/DeclarationsContributor.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/DeclarationsContributor.java
new file mode 100644
index 00000000..cef4752e
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/DeclarationsContributor.java
@@ -0,0 +1,49 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2007 itemis AG and others.
+ * 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:
+ * itemis AG - Initial API and implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.xpand3.analyzation;
+
+import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
+import org.eclipse.xpand3.staticTypesystem.DeclaredFunction;
+import org.eclipse.xpand3.staticTypesystem.DeclaredType;
+
+/**
+ * @author Sven Efftinge
+ *
+ */
+public interface DeclarationsContributor {
+
+ /**
+ * this method is invoked during setup of this contributor.
+ * @param the type system to be used for resolving type and function references.
+ */
+ void setTypeSystemFactory(TypeSystemFactory tsf);
+
+ /**
+ * if this contributor has a type with the declared name, the respective DeclareTpye should be returned.
+ * This method is only invoked once per name, so caching is done by the framework
+ * @param name
+ * @return the declared type with the given name or null if there is no such type declared in this Resource.
+ */
+ DeclaredType typeForName(String name);
+
+ /**
+ * if this contributor has a type with the declared name, the respective DeclareTpye should be returned.
+ * This method is only invoked once per name.
+ * @param name
+ * @return
+ */
+ DeclaredFunction functionForName(String name, AbstractTypeReference...parameterTypes);
+}

Back to the top