MCPcopy Create free account
hub / github.com/BaseXdb/basex / optimize

Method optimize

basex-core/src/main/java/org/basex/query/expr/constr/CPI.java:36–46  ·  view source on GitHub ↗
(final CompileContext cc)

Source from the content-addressed store, hash-verified

34 }
35
36 @Override
37 public Expr optimize(final CompileContext cc) throws QueryException {
38 name = name.simplifyFor(Simplify.STRING, cc);
39 if(name instanceof Value) {
40 final byte[] nm = ncname(false, cc.qc);
41 name = Str.get(nm);
42 exprType.assign(NodeType.get(NameTest.get(new QNm(nm), Kind.PROCESSING_INSTRUCTION)));
43 }
44 optValue(cc);
45 return this;
46 }
47
48 @Override
49 public FPI item(final QueryContext qc, final InputInfo ii) throws QueryException {

Callers 5

inlineMethod · 0.45
inlineMethod · 0.45
inlineMethod · 0.45
simplifyForMethod · 0.45
inlineMethod · 0.45

Calls 7

getMethod · 0.95
getMethod · 0.95
getMethod · 0.95
ncnameMethod · 0.80
optValueMethod · 0.80
simplifyForMethod · 0.45
assignMethod · 0.45

Tested by

no test coverage detected