com.ibm.wala.cast.java.translator.polyglot
Class PolyglotJava2CAstTranslator
java.lang.Object
com.ibm.wala.cast.java.translator.polyglot.PolyglotJava2CAstTranslator
- All Implemented Interfaces:
- TranslatorToCAst
public class PolyglotJava2CAstTranslator
- extends java.lang.Object
- implements TranslatorToCAst
|
Method Summary |
protected void |
addConstructorsToAnonymousClass(polyglot.ast.New n,
polyglot.types.ParsedClassType anonType,
PolyglotJava2CAstTranslator.ClassContext classContext,
java.util.List<CAstEntity> memberEntities)
|
protected TranslatingVisitor |
createTranslator()
|
protected PolyglotTypeDictionary |
createTypeDict()
|
protected TranslatingVisitor |
getTranslator()
|
protected CAstTypeDictionary |
getTypeDict()
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind,
CAstNode c)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind,
CAstNode[] c)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2,
CAstNode c3)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2,
CAstNode c3,
CAstNode c4)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
int kind,
polyglot.util.Position p)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind,
CAstNode c)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind,
CAstNode[] c)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2,
CAstNode c3)
|
protected CAstNode |
makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2,
CAstNode c3,
CAstNode c4)
|
protected CAstSourcePositionMap.Position |
makePosition(polyglot.util.Position p)
|
protected static CAstOperator |
mapBinaryOpcode(polyglot.ast.Binary.Operator operator)
|
protected static java.util.Collection |
mapFlagsToQualifiers(polyglot.types.Flags flags)
|
protected static CAstOperator |
mapUnaryOpcode(polyglot.ast.Unary.Operator operator)
|
protected void |
processClassMembers(polyglot.ast.Node n,
polyglot.types.ClassType classType,
java.util.List<polyglot.ast.ClassMember> members,
PolyglotJava2CAstTranslator.DelegatingContext classContext,
java.util.List<CAstEntity> memberEntities)
|
CAstEntity |
translate(java.lang.Object ast,
java.lang.String fileName)
|
protected CAstNode |
translateConstant(java.lang.Object constant)
|
protected CAstEntity |
walkEntity(polyglot.ast.Node rootNode,
PolyglotJava2CAstTranslator.WalkContext context)
|
protected CAstNode |
walkNodes(polyglot.ast.Node n,
PolyglotJava2CAstTranslator.WalkContext context)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fFactory
protected final CAst fFactory
fNodeFactory
protected final polyglot.ast.NodeFactory fNodeFactory
fTypeSystem
protected final polyglot.types.TypeSystem fTypeSystem
fNPEType
protected polyglot.types.Type fNPEType
fCCEType
protected polyglot.types.Type fCCEType
fREType
protected polyglot.types.Type fREType
fClassLoaderRef
protected final ClassLoaderReference fClassLoaderRef
fIdentityMapper
protected PolyglotIdentityMapper fIdentityMapper
DEBUG
protected final boolean DEBUG
- See Also:
- Constant Field Values
PolyglotJava2CAstTranslator
public PolyglotJava2CAstTranslator(ClassLoaderReference clr,
polyglot.ast.NodeFactory nf,
polyglot.types.TypeSystem ts,
PolyglotIdentityMapper identityMapper)
getTranslator
protected final TranslatingVisitor getTranslator()
createTranslator
protected TranslatingVisitor createTranslator()
getTypeDict
protected CAstTypeDictionary getTypeDict()
createTypeDict
protected PolyglotTypeDictionary createTypeDict()
mapUnaryOpcode
protected static CAstOperator mapUnaryOpcode(polyglot.ast.Unary.Operator operator)
mapBinaryOpcode
protected static CAstOperator mapBinaryOpcode(polyglot.ast.Binary.Operator operator)
translateConstant
protected CAstNode translateConstant(java.lang.Object constant)
makePosition
protected CAstSourcePositionMap.Position makePosition(polyglot.util.Position p)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind,
CAstNode[] c)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind,
CAstNode c)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2,
CAstNode c3)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
CAst Ast,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2,
CAstNode c3,
CAstNode c4)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind,
CAstNode[] c)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind,
CAstNode c)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2,
CAstNode c3)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
polyglot.ast.Node n,
int kind,
CAstNode c1,
CAstNode c2,
CAstNode c3,
CAstNode c4)
makeNode
protected CAstNode makeNode(PolyglotJava2CAstTranslator.WalkContext wc,
int kind,
polyglot.util.Position p)
translate
public CAstEntity translate(java.lang.Object ast,
java.lang.String fileName)
- Specified by:
translate in interface TranslatorToCAst
mapFlagsToQualifiers
protected static java.util.Collection mapFlagsToQualifiers(polyglot.types.Flags flags)
processClassMembers
protected void processClassMembers(polyglot.ast.Node n,
polyglot.types.ClassType classType,
java.util.List<polyglot.ast.ClassMember> members,
PolyglotJava2CAstTranslator.DelegatingContext classContext,
java.util.List<CAstEntity> memberEntities)
addConstructorsToAnonymousClass
protected void addConstructorsToAnonymousClass(polyglot.ast.New n,
polyglot.types.ParsedClassType anonType,
PolyglotJava2CAstTranslator.ClassContext classContext,
java.util.List<CAstEntity> memberEntities)
walkEntity
protected CAstEntity walkEntity(polyglot.ast.Node rootNode,
PolyglotJava2CAstTranslator.WalkContext context)
walkNodes
protected CAstNode walkNodes(polyglot.ast.Node n,
PolyglotJava2CAstTranslator.WalkContext context)