|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtend.middleend.javaannotations.JavaFunctionClassContributor
public final class JavaFunctionClassContributor
This class contributes no types, but all public methods in a Java class as functions, both static and non-static. Non-static methods share an instance of the providing class *per Contributor instance*. For more global sharing of the instance, Contributor instances must be shared.
Field Summary | |
---|---|
static java.lang.String |
MIDDLE_END_NAME
|
Constructor Summary | |
---|---|
JavaFunctionClassContributor()
|
Method Summary | |
---|---|
boolean |
canHandle(java.lang.String resourceName)
gives the middle end a way to declare if it can and wants to handle a given source file / resource. |
static java.lang.String |
classAsResource(java.lang.Class<?> cls)
|
java.lang.String |
getName()
|
boolean |
mayHandle(java.lang.String resourceName)
gives the middle end a way to declare if it could possibly handle the given source file / resource based some weaker checks like filename extensions. |
ParsedResource |
parseResource(java.lang.String resourceName)
This method asks the middle end to parse a resource for which it declared that it is the appropriate handler, and return the functions contained therein. Implementations are not required to perform any caching because the MiddleEnd implementation takes care of that. |
void |
setMiddleEnd(MiddleEnd middleEnd)
This method is used to break the circular dependency between MiddleEnd and the language specific handlers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MIDDLE_END_NAME
Constructor Detail |
---|
public JavaFunctionClassContributor()
Method Detail |
---|
public boolean canHandle(java.lang.String resourceName)
LanguageSpecificMiddleEnd
canHandle
in interface LanguageSpecificMiddleEnd
public boolean mayHandle(java.lang.String resourceName)
LanguageSpecificMiddleEnd
mayHandle
in interface LanguageSpecificMiddleEnd
public ParsedResource parseResource(java.lang.String resourceName)
LanguageSpecificMiddleEnd
parseResource
in interface LanguageSpecificMiddleEnd
public java.lang.String getName()
getName
in interface LanguageSpecificMiddleEnd
public void setMiddleEnd(MiddleEnd middleEnd)
LanguageSpecificMiddleEnd
setMiddleEnd
in interface LanguageSpecificMiddleEnd
public static java.lang.String classAsResource(java.lang.Class<?> cls)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |