|
TPTP 4.6.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.hyades.probekit.internal.Compiler
public class Compiler
This is the default implementation of IProbeCompiler. CompilerFactory will return an instance of this class if nobody uses the extension point to tell it to return a different one.
| Nested Class Summary | |
|---|---|
static class |
Compiler.ProbeDetails
Holds the computed details about a probe, like its unique name, the signatures of the fragment functions, and convenience flags and attributes. |
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.hyades.probekit.IProbeCompiler |
|---|
PROBEKIT_PROBLEM_MARKER |
| Constructor Summary | |
|---|---|
Compiler()
The default constructor. |
|
Compiler(Probekit probekit)
Deprecated. |
|
Compiler(java.lang.String file)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addFile(java.lang.String file)
Deprecated. |
java.lang.String |
addIFile(org.eclipse.core.resources.IFile file)
|
void |
addProbekit(Probekit probekit)
Deprecated. |
void |
addResource(org.eclipse.emf.ecore.resource.Resource res)
Deprecated. Use addResource(Resource,IResource) instead,
because it can report errors against the proper Workspace resource. |
java.lang.String |
addResource(org.eclipse.emf.ecore.resource.Resource res,
org.eclipse.core.resources.IResource ires)
Add probekits that appear at the top level of an EMF resource to the probekits this compiler will compile. |
java.lang.String |
getClassSuffix()
API function to return the suffix string that is added to the string from setClassPrefix() to form the class name. |
java.lang.String |
getEngineScript()
Get the script that describes this probe set to the BCI engine. |
java.lang.String |
getGeneratedSource()
Get the generated source. |
java.lang.String |
makeValidJavaIdentifier(java.lang.String arg)
See the interface definition for an explanation. |
void |
setClassPrefix(java.lang.String prefix)
Sets the class prefix to use for generated probe classes. |
void |
setPackageName(java.lang.String pkg)
Sets the package name to use. |
void |
verify()
Tests a probe set for correctness and consistency. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Compiler()
public Compiler(Probekit probekit)
probekit -
public Compiler(java.lang.String file)
throws org.eclipse.hyades.probekit.ProbekitException
file - the name of the file to load.
org.eclipse.hyades.probekit.ProbekitException - for serious errors (not just syntax errors in the probe source)| Method Detail |
|---|
public void addProbekit(Probekit probekit)
throws org.eclipse.hyades.probekit.ProbekitException
addProbekit in interface org.eclipse.hyades.probekit.IProbeCompilerprobekit - the Probekit to add
org.eclipse.hyades.probekit.ProbekitException - for serious errors (not just syntax errors in the probe source)
public void addFile(java.lang.String file)
throws org.eclipse.hyades.probekit.ProbekitException
addFile in interface org.eclipse.hyades.probekit.IProbeCompilerfile - the name of the file to load.
org.eclipse.hyades.probekit.ProbekitException - for serious errors (not just syntax errors in the probe source)
public void addResource(org.eclipse.emf.ecore.resource.Resource res)
throws org.eclipse.hyades.probekit.ProbekitException
addResource(Resource,IResource) instead,
because it can report errors against the proper Workspace resource.
Since no IResource is available to report errors against, errors are reported using marker objects at the top level of the workspace.
See addResource(Resource,IResource) regarding LocationAdapters
being put on the EObjects of the Resource.
addResource in interface org.eclipse.hyades.probekit.IProbeCompilerres - the Resource to scan for probekits.
org.eclipse.hyades.probekit.ProbekitException - for serious errors
public java.lang.String addResource(org.eclipse.emf.ecore.resource.Resource res,
org.eclipse.core.resources.IResource ires)
throws org.eclipse.hyades.probekit.ProbekitException
The Resource you pass in will have LocationAdapter instances
attached to its EObjects using the EMF eAdapters system. The LocationAdapter
tells which lines in the generated Java source came from each EObject
in the Resource.
addResource in interface org.eclipse.hyades.probekit.IProbeCompilerres - the EMF Resource to scan for probekits.ires - the Eclipse IResource to use for reporting errors
org.eclipse.hyades.probekit.ProbekitException - for serious errors (not just syntax errors in the probe source)
public java.lang.String addIFile(org.eclipse.core.resources.IFile file)
throws org.eclipse.hyades.probekit.ProbekitException
addIFile in interface org.eclipse.hyades.probekit.IProbeCompilerorg.eclipse.hyades.probekit.ProbekitException
public void setClassPrefix(java.lang.String prefix)
throws org.eclipse.hyades.probekit.ProbekitException
setClassPrefix in interface org.eclipse.hyades.probekit.IProbeCompilerorg.eclipse.hyades.probekit.ProbekitException - if you pass a class prefix that's not valid Java syntax
public void setPackageName(java.lang.String pkg)
throws org.eclipse.hyades.probekit.ProbekitException
setPackageName in interface org.eclipse.hyades.probekit.IProbeCompilerpkg -
org.eclipse.hyades.probekit.ProbekitExceptionpublic java.lang.String getClassSuffix()
Don't change the value of this string ("_probe") because it's something users of the static instrumentation system are likely to write into their automation scripts.
getClassSuffix in interface org.eclipse.hyades.probekit.IProbeCompilerpublic java.lang.String makeValidJavaIdentifier(java.lang.String arg)
makeValidJavaIdentifier in interface org.eclipse.hyades.probekit.IProbeCompiler
public void verify()
throws org.eclipse.hyades.probekit.ProbekitException
Reports errors as Problem markers on the original resource.
verify in interface org.eclipse.hyades.probekit.IProbeCompilerorg.eclipse.hyades.probekit.ProbekitException - for serious errors (not just syntax errors)
org.eclipse.hyades.probekit.ProbekitCompileProblemException - for problems that have been reported as markers.
public java.lang.String getGeneratedSource()
throws org.eclipse.hyades.probekit.ProbekitException
getGeneratedSource in interface org.eclipse.hyades.probekit.IProbeCompilerorg.eclipse.hyades.probekit.ProbekitException
public java.lang.String getEngineScript()
throws org.eclipse.hyades.probekit.ProbekitException
getEngineScript in interface org.eclipse.hyades.probekit.IProbeCompilerorg.eclipse.hyades.probekit.ProbekitException
|
TPTP 4.6.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||