com.google.gwt.core.ext.typeinfo.JField.isFinal()方法的使用及代码示例

x33g5p2x  于9个月前 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(13)

本文整理了Java中com.google.gwt.core.ext.typeinfo.JField.isFinal()方法的一些代码示例,展示了JField.isFinal()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JField.isFinal()方法的具体详情如下:
包路径:com.google.gwt.core.ext.typeinfo.JField
类名称:JField
方法名:isFinal

JField.isFinal介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

String annotations = getAnnotations(f.getDeclaredAnnotations());
pb("    new Field(\"" + f.getName() + "\", " + enclosingType + ", " + fieldType + ", " + f.isFinal() + ", "
  + f.isDefaultAccess() + ", " + f.isPrivate() + ", " + f.isProtected() + ", " + f.isPublic() + ", "
  + f.isStatic() + ", " + f.isTransient() + ", " + f.isVolatile() + ", " + setterGetter + ", " + setterGetter
stub.type = fieldType;
stub.isStatic = f.isStatic();
stub.isFinal = f.isFinal();
if (enclosingType != null && fieldType != null) {
  stub.getter = setterGetter;

代码示例来源:origin: libgdx/libgdx

String annotations = getAnnotations(f.getDeclaredAnnotations());
pb("    new Field(\"" + f.getName() + "\", " + enclosingType + ", " + fieldType + ", " + f.isFinal() + ", "
  + f.isDefaultAccess() + ", " + f.isPrivate() + ", " + f.isProtected() + ", " + f.isPublic() + ", "
  + f.isStatic() + ", " + f.isTransient() + ", " + f.isVolatile() + ", " + setterGetter + ", " + setterGetter
stub.type = fieldType;
stub.isStatic = f.isStatic();
stub.isFinal = f.isFinal();
if (enclosingType != null && fieldType != null) {
  stub.getter = setterGetter;

代码示例来源:origin: errai/errai

@Override
public boolean isFinal() {
 return field.isFinal();
}

代码示例来源:origin: org.jboss.errai/errai-codegen-gwt

@Override
public boolean isFinal() {
 return field.isFinal();
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Returns true if we will need a get/set method pair for a field.
 * 
 * @return true if the field requires accessor methods
 */
private boolean needsAccessorMethods(JField field) {
 /*
  * Field serializers are always emitted into the same package as the
  * class that they serialize. This enables the serializer class to access
  * all fields except those that are private or final.
  *
  * Java Access Levels: default - package private - class only protected -
  * package and all subclasses public - all
  */
 if (Shared.shouldSerializeFinalFields(logger, context)) {
  return field.isPrivate() || field.isFinal();
 } else {
  return field.isPrivate();
 }
}

代码示例来源:origin: Putnami/putnami-web-toolkit

private void listPublicFields(JField[] fields) {
  for (JField field : fields) {
    if (field.isPublic() && !field.isFinal()) {
      this.publicFields.put(field.getName(), field.getType());
      this.propertyTypes.put(field.getName(), field.getType());
      this.addImport(field.getType());
    }
  }
}

代码示例来源:origin: oVirt/ovirt-engine

@Test
public void processField_final() {
  when(field.isFinal()).thenReturn(true);
  verifyProcessFieldReturns(true);
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Returns true if we will need a get/set method pair for a field.
 * 
 * @return true if the field requires accessor methods
 */
private boolean needsAccessorMethods(JField field) {
 /*
  * Field serializers are always emitted into the same package as the
  * class that they serialize. This enables the serializer class to access
  * all fields except those that are private or final.
  *
  * Java Access Levels: default - package private - class only protected -
  * package and all subclasses public - all
  */
 if (Shared.shouldSerializeFinalFields(logger, context)) {
  return field.isPrivate() || field.isFinal();
 } else {
  return field.isPrivate();
 }
}

代码示例来源:origin: fr.putnami.pwt/pwt

private void listPublicFields(JField[] fields) {
  for (JField field : fields) {
    if (field.isPublic() && !field.isFinal()) {
      this.publicFields.put(field.getName(), field.getType());
      this.propertyTypes.put(field.getName(), field.getType());
      this.addImport(field.getType());
    }
  }
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Returns <code>true</code> if the field qualifies for serialization without
 * considering its type.
 */
static boolean shouldConsiderForSerialization(TreeLogger logger, GeneratorContext context,
  JField field) {
 if (field.isStatic() || field.isTransient() || hasGwtTransientAnnotation(field)) {
  return false;
 }
 if (field.isFinal() && !Shared.shouldSerializeFinalFields(logger, context)) {
  logFinalField(logger, context, field);
  return false;
 }
 return true;
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Returns <code>true</code> if the field qualifies for serialization without
 * considering its type.
 */
static boolean shouldConsiderForSerialization(TreeLogger logger, GeneratorContext context,
  JField field) {
 if (field.isStatic() || field.isTransient() || hasGwtTransientAnnotation(field)) {
  return false;
 }
 if (field.isFinal() && !Shared.shouldSerializeFinalFields(logger, context)) {
  logFinalField(logger, context, field);
  return false;
 }
 return true;
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

int numRpcFields = 0;
for (JField f : fields) {
 if (f.isTransient() || f.isStatic() || f.isFinal()) {
  continue;

代码示例来源:origin: seanchenxi/gwt-storage

int numRpcFields = 0;
for (JField f : fields) {
 if (f.isTransient() || f.isStatic() || f.isFinal()) {
  continue;

代码示例来源:origin: net.wetheinter/gwt-user

int numRpcFields = 0;
for (JField f : fields) {
 if (f.isTransient() || f.isStatic() || f.isFinal()) {
  continue;

代码示例来源:origin: net.wetheinter/gwt-reflect

public static int getModifiers(JField field) {
 int mod;

 if (field.isPublic())
  mod = Modifier.PUBLIC;
 else if (field.isPrivate())
  mod = Modifier.PRIVATE;
 else if (field.isProtected())
  mod = Modifier.PROTECTED;
 else
  mod = 0;//Package Protected

 if (field.isFinal())
  mod |= Modifier.FINAL;
 if (field.isStatic())
  mod |= Modifier.STATIC;
 if (field.isTransient())
  mod |= Modifier.TRANSIENT;
 if (field.isVolatile())
  mod |= Modifier.VOLATILE;

 return mod;
}

代码示例来源:origin: net.wetheinter/gwt-user

public static int getModifiers(final JField field) {
 int mod;
 if (field.isPublic()) {
  mod = Modifier.PUBLIC;
 } else if (field.isPrivate()) {
  mod = Modifier.PRIVATE;
 } else if (field.isProtected()) {
  mod = Modifier.PROTECTED;
 }
 else {
  mod = 0;//Package Protected
 }
 if (field.isFinal()) {
  mod |= Modifier.FINAL;
 }
 if (field.isStatic()) {
  mod |= Modifier.STATIC;
 }
 if (field.isTransient()) {
  mod |= Modifier.TRANSIENT;
 }
 if (field.isVolatile()) {
  mod |= Modifier.VOLATILE;
 }
 return mod;
}

代码示例来源:origin: hpehl/piriti

if (!field.isFinal()
    && (field.isPublic() || samePackage && (field.isDefaultAccess() || field.isProtected())))

代码示例来源:origin: fr.lteconsulting/hexa.binding.gwt

private String getFieldModifier( JField field )
{
  ModifierBuilder mb = new ModifierBuilder();
  if( field.isPrivate() )
    mb.append( "2" );//"java.lang.reflect.Modifier.PRIVATE" );
  if( field.isProtected() )
    mb.append( "4" );//"java.lang.reflect.Modifier.PROTECTED" );
  if( field.isPublic() )
    mb.append( "1" );//"java.lang.reflect.Modifier.PUBLIC" );
  if( field.isStatic() )
    mb.append( "8" );//"java.lang.reflect.Modifier.STATIC" );
  if( field.isTransient() )
    mb.append( "128" );//"java.lang.reflect.Modifier.TRANSIENT" );
  if( field.isVolatile() )
    mb.append( "64" );//"java.lang.reflect.Modifier.VOLATILE" );
  if( field.isFinal() )
    mb.append( "16" );//"java.lang.reflect.Modifier.FINAL" );
  return mb.toString();
}

代码示例来源:origin: ltearno/hexa.tools

private String getFieldModifier( JField field )
{
  ModifierBuilder mb = new ModifierBuilder();
  if( field.isPrivate() )
    mb.append( "2" );//"java.lang.reflect.Modifier.PRIVATE" );
  if( field.isProtected() )
    mb.append( "4" );//"java.lang.reflect.Modifier.PROTECTED" );
  if( field.isPublic() )
    mb.append( "1" );//"java.lang.reflect.Modifier.PUBLIC" );
  if( field.isStatic() )
    mb.append( "8" );//"java.lang.reflect.Modifier.STATIC" );
  if( field.isTransient() )
    mb.append( "128" );//"java.lang.reflect.Modifier.TRANSIENT" );
  if( field.isVolatile() )
    mb.append( "64" );//"java.lang.reflect.Modifier.VOLATILE" );
  if( field.isFinal() )
    mb.append( "16" );//"java.lang.reflect.Modifier.FINAL" );
  return mb.toString();
}

代码示例来源:origin: junkdog/artemis-odb

String annotations = getAnnotations(f.getDeclaredAnnotations());
pb("new Field(\"" + f.getName() + "\", " + enclosingType + ", " + fieldType + ", " + f.isFinal() + ", "
  + f.isDefaultAccess() + ", " + f.isPrivate() + ", " + f.isProtected() + ", " + f.isPublic() + ", "
  + f.isStatic() + ", " + f.isTransient() + ", " + f.isVolatile() + ", " + getter + ", " + setter + ", "
stub.type = fieldType;
stub.isStatic = f.isStatic();
stub.isFinal = f.isFinal();
if (enclosingType != null && fieldType != null) {
  stub.getter = getter;

相关文章