Jeremiah Connelly

API Issues under Advisor 6.7 - NdAdvisorProjectCompilerStatistics

Discussion created by Jeremiah Connelly on Sep 21, 2009
Latest reply on Sep 23, 2009 by Andrei Palskoi

I am trying to write a custom Java class to log information about the compiliation statistics during a build.   I found the Advisor API class to do this, NdAdvisorProjectCompilerStatistics,  within the framework.   However, there is something odd when trying to work with this class, other than no information on the class in the API docs.  


There isnt a constructor to this class, listed within the API docs.   But when I run a "javap" i get what appears to be a constructor that takes in two "int" properties.  


Compiled from ""
public class extends java.lang.Object implements com.blazesoft.codegen.NdD
iagnostic{, int);
    public int getType();
    public java.lang.String getMessage();
    public int getNumRules();
    public int getNumEntities();


But when I try to use this in a java class, simply passing in (1, 1), it gives an error.


C:\Blaze\Advisor67\examples\deployments\java\statistics\ NdAdvisorProjectCompilerStatistics(int,int) is not public
in; cannot be accessed from outside package
                NdAdvisorProjectCompilerStatistics compilerStatistics = new NdAdvisorProjectCompilerStatistics(1, 1);
1 error


And if I try and simply construct a new variable of the class it throws another error.   


C:\Blaze\Advisor67\examples\deployments\java\statistics\ cannot find symbol
symbol  : constructor NdAdvisorProjectCompilerStatistics()
location: class
                NdAdvisorProjectCompilerStatistics compilerStatistics = new NdAdvisorProjectCompilerStatistics();
1 error


This errors do not make sense, because the class is Public in the API and javap output.   If the class were an interface then I can understand this, however, nothing indicates that this is the case.   


I realize that this class appears to be a new implementation (6.7 and not available in 6.5.x) and it still might need to be shaken out, however, I hope someone can provide some light on this or even the Server team taking a look.   We would like to pull this functionality into some build scripts and output logs/reports, so any help would be greatly appreciated.


** Edit:   I should also mention that unless there is someway for this class to reference a server or repository, then there is no way to actually "get" the statistics.   There doesn't appear to be a way to do that right now.   Unless I am completely missing a point somewhere.



T.A.Z. Rules Consulting

Message Edited by TAZRules on 09-21-2009 09:37 AM