This section provides hands-on examples of XPath queries over the AST.翻訳 - This section provides hands-on examples of XPath queries over the AST.中国語言う方法

This section provides hands-on exam

This section provides hands-on examples of XPath queries over the AST. You will probably find this section more useful if you follow it with Designer and copy/paste the examples.
Let's assume you want to match something on class variable names. You see in the ASTVviewer that VariableDeclaratorId contains the variable name - in XML terms, the name is in the @Image attribute. So you try an XPath expression as follows:


//VariableDeclaratorId

If you try this expression you'll see that variables declared in methods are also matched. A more precise expression for matching field declarations is, well, using the FieldDeclaration node. This expression matches only the two fields declared in the class:

//FieldDeclaration

In a similar way, you can match only local variables with this expression

//LocalVariableDeclaration

With local variables we need to be more careful. Consider the following class:
0/5000
ソース言語: -
ターゲット言語: -
結果 (中国語) 1: [コピー]
コピーしました!
本节提供在 AST 的 XPath 查询的实际例子。如果你跟设计师和拷贝的例子,可能会找这一个区段更有用。让我们假设你想匹配类变量名称上的东西。看见你在 ASTVviewer VariableDeclaratorId 包含的变量的名称-在 XML 术语中,名称是 @Image 属性中。所以,你试着一个 XPath 表达式,如下所示:VariableDeclaratorId如果您尝试此表达式,您将看到在方法中声明的变量也会相匹配。一个更精确的表达式匹配字段声明,嗯,使用 FieldDeclaration 节点。此表达式匹配只有在类中声明的两个字段:FieldDeclaration用相似的方式,您可以匹配只本地变量与此表达式LocalVariableDeclaration与本地变量,我们需要更加小心。请考虑下面的类:
翻訳されて、しばらくお待ちください..
結果 (中国語) 3:[コピー]
コピーしました!
本节提供了过去的XPath查询的实例。你可能会发现这段更有用,如果你按照它的设计师和复制/粘贴的例子。
假设你想匹配的类的变量名称的东西。你看到在astvviewer,variabledeclaratorid包含变量名在XML术语,名称是“图像属性。所以你要一个XPath表达式如下:


/ variabledeclaratorid

如果您尝试表达你会看到变量的方法也匹配。匹配字段声明一个更精确的表达,以及,使用fielddeclaration节点。这种表达的比赛只有两个领域在类中声明:

/ fielddeclaration

以类似的方式,你可以只匹配此表达式

/ localvariabledeclaration

与局部变量,我们需要更仔细的局部变量。考虑下面的类:
翻訳されて、しばらくお待ちください..
 
他の言語
翻訳ツールのサポート: アイスランド語, アイルランド語, アゼルバイジャン語, アフリカーンス語, アムハラ語, アラビア語, アルバニア語, アルメニア語, イタリア語, イディッシュ語, イボ語, インドネシア語, ウイグル語, ウェールズ語, ウクライナ語, ウズベク語, ウルドゥ語, エストニア語, エスペラント語, オランダ語, オリヤ語, カザフ語, カタルーニャ語, カンナダ語, ガリシア語, キニヤルワンダ語, キルギス語, ギリシャ語, クメール語, クリンゴン, クルド語, クロアチア語, グジャラト語, コルシカ語, コーサ語, サモア語, ショナ語, シンド語, シンハラ語, ジャワ語, ジョージア(グルジア)語, スウェーデン語, スコットランド ゲール語, スペイン語, スロバキア語, スロベニア語, スワヒリ語, スンダ語, ズールー語, セブアノ語, セルビア語, ソト語, ソマリ語, タイ語, タガログ語, タジク語, タタール語, タミル語, チェコ語, チェワ語, テルグ語, デンマーク語, トルクメン語, トルコ語, ドイツ語, ネパール語, ノルウェー語, ハイチ語, ハウサ語, ハワイ語, ハンガリー語, バスク語, パシュト語, パンジャブ語, ヒンディー語, フィンランド語, フランス語, フリジア語, ブルガリア語, ヘブライ語, ベトナム語, ベラルーシ語, ベンガル語, ペルシャ語, ボスニア語, ポルトガル語, ポーランド語, マオリ語, マケドニア語, マラガシ語, マラヤーラム語, マラーティー語, マルタ語, マレー語, ミャンマー語, モンゴル語, モン語, ヨルバ語, ラオ語, ラテン語, ラトビア語, リトアニア語, ルクセンブルク語, ルーマニア語, ロシア語, 中国語, 日本語, 繁体字中国語, 英語, 言語を検出する, 韓国語, 言語翻訳.

Copyright ©2024 I Love Translation. All reserved.

E-mail: