220 likes | 340 Views
Structural Search: Two Examples. Ted M. Young http://about.me/tedmyoung Polyglot Coder in Labs Guidewire Software. The Problem. Want to Find Something. Use RegEx !. Does not understand class hierarchy. Find Usages?. Too many results: want to restrict by visibility. Simple example….
E N D
Structural Search: Two Examples Ted M. Young http://about.me/tedmyoung Polyglot Coder in Labs Guidewire Software
Use RegEx! Does not understand class hierarchy
Find Usages? Too many results: want to restrict by visibility
Simple example… Find only direct implementors
Find IQueryFilter Implementers • Only public, static, concrete classes • Not abstract, not private
Structural Search Template • Look for: public, static implementations
The "OuterClass" Variable • Nothing special here, we "don't care"
The "Class" Variable Scripting Target
Script Constraints • Want classes that don't have the "abstract" modifier • Warning: not well documented!
The "Interface" Variable • Looking for IQueryFilter implementations
Text Constraints • Want IQueryFiltersubinterfaces and subclasses as well (i.e., the type hierarchy)
That's All Folks! Ted M. Young http://about.me/tedmyoung