a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 292|回复: 0

[基础知识] JAVA基础:Java反射机制获取内部类的静态成员

[复制链接]
发表于 2012-8-4 12:37:27 | 显示全部楼层 |阅读模式
比来需要些一个可设置装备摆设的索引构建轨范,需要在运行时挪用Lucene包的如下类及其成员:   引用, \: }# U: G/ Y- J" d
  Nested Class Summary
( A% O- O+ d; k9 x: s/ L  static class Field.Index! j$ Q: T# ^" B* O
  Specifies whether and how a field should be indexed.
% O2 o! L$ n: e& G; Y/ A  static class Field.Store" z+ }" y0 ~, T
  Specifies whether and how a field should be stored.
0 z7 `7 S4 L4 U2 H3 w  static class Field.TermVector% O1 {0 ]' p  g$ p: k4 t* H
  Specifies whether and how a field should have term vectors.+ W6 i' o; t% @4 \; ~2 o% G
  lucene api中称之为Nested Class,意为嵌套类,而嵌套类内部的File.Index的成员又是静态成员。/ f, ^- z0 a$ w* [! i
  引用1 ^5 V$ q' D4 q0 S4 F
  Field Summary
. n$ p6 C2 e% L/ q) |7 T  static Field.Index ANALYZED6 N5 _. T7 T! t; Y' v
  Index the tokens produced by running the field's value through an Analyzer.$ e0 g- M6 p3 c& V/ ~3 p8 o& F, n: N
  static Field.Index ANALYZED_NO_NORMS- h2 E. i; ^3 A9 k
  Expert: Index the tokens produced by running the field's value through an Analyzer, and also separately disable the storing of norms.0 }4 k' F9 G: J
  static Field.Index NO
/ J' v! q( i: T, I; w& d  Do not index the field value.
/ X' C) M0 e! e5 L* v: H; U% V  static Field.Index NO_NORMS
: N+ v: M; j( ]  Deprecated. This has been renamed to NOT_ANALYZED_NO_NORMS
. T1 R: S3 z5 [& K& M  static Field.Index NOT_ANALYZED
+ @5 x4 t  X1 e  Index the field's value without using an Analyzer, so it can be searched.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-4-29 21:02 , Processed in 0.167539 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表