@Override public ASTNode findChildByRole(int role) { LOG.assertTrue(ChildRole.isUnique(role)); switch(role){ default: return null; case ChildRole.BLOCK: return findChildByType(Constants.CODE_BLOCK); } }
@Override public int getChildRole(ASTNode child) { LOG.assertTrue(child.getTreeParent() == this); if (child.getElementType() == Constants.CODE_BLOCK) { return ChildRole.BLOCK; } else { return ChildRoleBase.NONE; } }
public PsiBlockStatementImpl() { super(Constants.BLOCK_STATEMENT); }
public PsiPostfixExpressionImpl() { super(Constants.POSTFIX_EXPRESSION); }
public PsiEmptyStatementImpl() { super(Constants.EMPTY_STATEMENT); }
public PsiEmptyExpressionImpl() { super(Constants.EMPTY_EXPRESSION); }
public FieldElement() { super(Constants.FIELD); }
public PsiIdentifierImpl(CharSequence text) { super(Constants.IDENTIFIER, text); }
@NotNull @Override public List<PsiField> getOwnFields() { return asList(getStub().getChildrenByType(Constants.FIELD_BIT_SET, PsiField.ARRAY_FACTORY)); }
@NotNull @Override public List<PsiMethod> getOwnMethods() { return asList(getStub().getChildrenByType(Constants.METHOD_BIT_SET, PsiMethod.ARRAY_FACTORY)); }