Code to analyze a source base for project lambda
Osvaldo Doederlein
opinali at gmail.com
Tue Feb 9 10:21:56 PST 2010
FWIW, follows results for my largest project here, with the fixed tool:
Total anonymous classes: 312
But with no constructor args: 312
And defining only one method: 294
And where the type is a SAM type: 60
Those that are recursive: 0
Those that reference 'this': 0
C:\Workspaces\nb\Switch\src\java\br\com\tecban\switchtb\core\translation\TranslationConfig.java:172:
[Anon, OneMethodOnly, NeedsMethod, SuperThis] uses an enclosing 'this'
C:\Workspaces\nb\Switch\src\java\br\com\tecban\switchtb\core\translation\TranslationConfig.java:108:
[Anon, OneMethodOnly, NeedsMethod, SuperThis] uses an enclosing 'this'
Those that reference an enclosing 'this': 2
Those that are interfaces: 52
Those that are classes: 8
Total distinct interfaces: 7
br.com.tecban.switchtb.core.Lifecycle.Fire
br.com.tecban.switchtb.core.config.ConfigurationFilter
br.com.tecban.switchtb.core.config.ConfigurationValidator
br.com.tecban.switchtb.core.crypto.CryptoMethod
br.com.tecban.switchtb.core.decision.RuleDef.Filter
java.io.FilenameFilter
java.util.Comparator
Total distinct classes: 3
br.com.tecban.switchtb.core.util.ejb.AbstractSessionBean.Finder
br.com.tecban.switchtb.core.util.ejb.AbstractSessionBean.FinderN
java.util.TimerTask
My only uses of enclosing 'this' were due to naming conflict: the inner
class defines a method 'validate', which implementation must invoke a helper
method from the enclosing class that's also called 'validate', like:
public void validate (final ConfigurationEntity entity) {
TranslationConfig.this.validate((LayoutDef)entity, parsing);
}
A+
Osvaldo
2010/2/6 Neal Gafter <neal at gafter.com>
> On Fri, Feb 5, 2010 at 1:13 AM, Mark Mahieu <markmahieu at googlemail.com
> >wrote:
>
> > I think I've identified a smallish bug in Neal's analysis code, having
> > cross referenced its output with that of my own.
> >
>
> Yes, that was a bug, and it did skew the results in a way that erroneously
> favored both supporting SAM classes and nonlexical "this". The corrected
> stats for openjdk6 are below. The corrected code can be downloaded from
> http://www.javac.info/ijavac-Main.java
>
> Cheers,
> Neal
>
> Total anonymous classes: 1177
> But with no constructor args: 1089
> And defining only one method: 900
> And where the type is a SAM type: 828
> Those that are recursive: 0
> Those that reference 'this': 2
> Those that reference an enclosing 'this': 49
> Those that are interfaces: 771
> Those that are classes: 57
> Total distinct interfaces: 48
> Total distinct classes: 11
>
> The distinct interfaces were
> com.sun.java.util.jar.pack.Histogram.BitMetric
> com.sun.jdi.connect.Transport
> com.sun.jmx.remote.internal.NotificationBufferFilter
> com.sun.media.sound.ModelTransform
> com.sun.net.ssl.HostnameVerifier
> com.sun.security.auth.callback.DialogCallbackHandler.Action
> com.sun.tools.example.debug.bdi.InputListener
> com.sun.tools.example.debug.bdi.OutputListener
> com.sun.tools.example.debug.expr.ExpressionParser.GetFrame
> com.sun.tools.hat.internal.oql.ObjectVisitor
> com.sun.tools.jdi.CommandSender
> com.sun.tools.script.shell.Main.Command
> java.awt.Conditional
> java.awt.KeyEventPostProcessor
> java.awt.event.ActionListener
> java.awt.event.HierarchyListener
> java.beans.ExceptionListener
> java.beans.PropertyChangeListener
> java.beans.VetoableChangeListener
> java.io.FilenameFilter
> java.io.ObjectInputValidation
> java.lang.Runnable
> java.net.CookiePolicy
> java.net.HttpCookie.CookieAttributeAssignor
> java.security.PrivilegedAction
> java.security.PrivilegedExceptionAction
> java.util.Comparator
> java.util.concurrent.Callable
> java.util.concurrent.Executor
> java.util.concurrent.ThreadFactory
> javax.imageio.event.IIOReadWarningListener
> javax.imageio.event.IIOWriteWarningListener
> javax.management.NotificationListener
> javax.swing.UIDefaults.ActiveValue
> javax.swing.UIDefaults.LazyValue
> javax.swing.event.CaretListener
> javax.swing.event.ChangeListener
> javax.swing.event.HyperlinkListener
> javax.xml.crypto.KeySelectorResult
> javax.xml.crypto.NodeSetData
> sun.awt.RequestFocusController
> sun.java2d.StateTracker
> sun.java2d.cmm.ProfileActivator
> sun.java2d.loops.ProcessPath.EndSubPathHandler
> sun.misc.JavaIODeleteOnExitAccess
> sun.misc.JavaNetAccess
> sun.nio.ch.FileChannelImpl.FileLockTable.Releaser
> sun.nio.ch.Interruptible
>
> The distinct classes were:
> com.sun.tools.example.debug.tty.Commands.AsyncExecution
> com.sun.tools.hat.internal.model.AbstractJavaHeapObjectVisitor
> com.sun.tools.hat.internal.util.Comparer
> java.awt.font.TextLine.Function
> java.io.OutputStream
> java.nio.charset.CoderResult.Cache
> java.util.TimerTask
> java.util.regex.Pattern.CharProperty
> java.util.regex.Pattern.CharPropertyNames.CharPropertyFactory
> java.util.regex.Pattern.CharPropertyNames.CloneableProperty
> javax.swing.AbstractAction
>
>
More information about the lambda-dev
mailing list