void buildFieldDocumentation(FieldInfo field, TypeMemberNode fieldDeclaration) { var comment = ParserHelper.decodeDocumentation(context.Text, fieldDeclaration.DocumentationOffset, fieldDeclaration.DocumentationLength); memberKind = MemberKind.Field; this.field = field; node = fieldDeclaration; appendDocumentation(getIdString(field), comment); }
public static MemberInfo getInfo(FieldInfo field) { var result = field.getUserData(typeof(FieldMemberInfo)); if (result == null) { result = new FieldMemberInfo(field); field.addUserData(result); } return result; }
private static String getIdString(FieldInfo field) { return "F:" + getIdName(field.DeclaringType) + "." + field.Name; }
protected override void initializeFields() { if (classInfo == null || classInfo.fields == null) { return; } initializeBaseTypes(); foreach (var f in classInfo.fields) { var field = new FieldInfo(this, f.modifiers, f.name, f.value); try { if (f.signature == null) { field.type = getTypeInfo(f.type); } else { field.type = getTypeInfo(f.signature); } if (f.annotations == null) { field.annotations = Collections.emptyList(); } else { field.annotations = buildAnnotationValues(f.annotations); } } catch (Exception e) { System.out.print("Error on " + field); System.out.println((f.signature == null) ? (" by type " + f.type) : (" by signature " + f.signature.Name) ); continue; } fields.add(field); } classInfo.fields = null; if (classInfo.methods == null) { classInfo = null; genericsScope = null; } }
public static bool isDeprecated(Library typeSystem, FieldInfo field) { return containsDeprecated(field.Annotations); }
public void emit(Opcode opcode, FieldInfo field) { checkCreated(); if (field == null) { throw new NullPointerException("field"); } switch (opcode) { case Getfield: instructions.add(new FieldInstruction(Opcode.Getfield, field)); break; case Getstatic: instructions.add(new FieldInstruction(Opcode.Getstatic, field)); break; case Putfield: instructions.add(new FieldInstruction(Opcode.Putfield, field)); break; case Putstatic: instructions.add(new FieldInstruction(Opcode.Putstatic, field)); break; default: throw new IllegalStateException("Illegal opcode usage: " + opcode); } }