Here you can find the source of isPrototypePropertyGet(PropertyGet pg)
public static final boolean isPrototypePropertyGet(PropertyGet pg)
//package com.java2s; /*/*from w w w. ja va 2 s . c om*/ * 06/05/2014 * * Copyright (C) 2014 Robert Futrell * robert_futrell at users.sourceforge.net * http://fifesoft.com/rsyntaxtextarea * * This library is distributed under a modified BSD license. See the included * RSTALanguageSupport.License.txt file for details. */ import org.mozilla.javascript.ast.AstNode; import org.mozilla.javascript.ast.Name; import org.mozilla.javascript.ast.PropertyGet; public class Main { public static final boolean isPrototypePropertyGet(PropertyGet pg) { return pg != null && pg.getLeft() instanceof Name && isPrototypeNameNode(pg.getRight()); } public static final boolean isPrototypeNameNode(AstNode node) { return node instanceof Name && "prototype".equals(((Name) node).getIdentifier()); } }