/** * Returns the value of this annotation or null if none */ public NdConstant getValue() { return VALUE.get(getNd(), this.address); }
public static IBinaryAnnotation createBinaryAnnotation(NdAnnotation ndAnnotation) { List<NdAnnotationValuePair> elementValuePairs = ndAnnotation.getElementValuePairs(); final IBinaryElementValuePair[] resultingPair = new IBinaryElementValuePair[elementValuePairs.size()]; for (int idx = 0; idx < elementValuePairs.size(); idx++) { NdAnnotationValuePair next = elementValuePairs.get(idx); resultingPair[idx] = new ElementValuePairInfo(next.getName().getChars(), unpackValue(next.getValue())); } final char[] binaryName = JavaNames.fieldDescriptorToBinaryName( ndAnnotation.getType().getRawType().getFieldDescriptor().getChars()); return new IBinaryAnnotation() { @Override public char[] getTypeName() { return binaryName; } @Override public IBinaryElementValuePair[] getElementValuePairs() { return resultingPair; } @Override public String toString() { return BinaryTypeFormatter.annotationToString(this); } }; }
private void initAnnotation(NdAnnotation annotation, IBinaryAnnotation next) { annotation.setType(createTypeIdFromBinaryName(next.getTypeName())); IBinaryElementValuePair[] pairs = next.getElementValuePairs(); if (pairs != null) { annotation.allocateValuePairs(pairs.length); for (IBinaryElementValuePair element : pairs) { NdAnnotationValuePair nextPair = annotation.createValuePair(element.getName()); nextPair.setValue(createConstantFromMixedType(element.getValue())); } } }
public NdAnnotationValuePair createValuePair(char[] name) { NdAnnotationValuePair result = ELEMENT_VALUE_PAIRS.append(getNd(), getAddress()); result.setName(name); return result; }
public static IBinaryAnnotation createBinaryAnnotation(NdAnnotation ndAnnotation) { List<NdAnnotationValuePair> elementValuePairs = ndAnnotation.getElementValuePairs(); final IBinaryElementValuePair[] resultingPair = new IBinaryElementValuePair[elementValuePairs.size()]; for (int idx = 0; idx < elementValuePairs.size(); idx++) { NdAnnotationValuePair next = elementValuePairs.get(idx); resultingPair[idx] = new ElementValuePairInfo(next.getName().getChars(), unpackValue(next.getValue())); } final char[] binaryName = JavaNames.fieldDescriptorToBinaryName( ndAnnotation.getType().getRawType().getFieldDescriptor().getChars()); return new IBinaryAnnotation() { @Override public char[] getTypeName() { return binaryName; } @Override public IBinaryElementValuePair[] getElementValuePairs() { return resultingPair; } @Override public String toString() { return BinaryTypeFormatter.annotationToString(this); } }; }
private void initAnnotation(NdAnnotation annotation, IBinaryAnnotation next) { annotation.setType(createTypeIdFromBinaryName(next.getTypeName())); IBinaryElementValuePair[] pairs = next.getElementValuePairs(); if (pairs != null) { annotation.allocateValuePairs(pairs.length); for (IBinaryElementValuePair element : pairs) { NdAnnotationValuePair nextPair = annotation.createValuePair(element.getName()); nextPair.setValue(createConstantFromMixedType(element.getValue())); } } }
public NdAnnotationValuePair createValuePair(char[] name) { NdAnnotationValuePair result = ELEMENT_VALUE_PAIRS.append(getNd(), getAddress()); result.setName(name); return result; }
/** * Returns the value of this annotation or null if none */ public NdConstant getValue() { return VALUE.get(getNd(), this.address); }
public IString getName() { return NAME.get(getNd(), this.address); }
public void setValue(NdConstant value) { VALUE.put(getNd(), this.address, value); } }
public void setValue(NdConstant value) { VALUE.put(getNd(), this.address, value); } }
public void setName(char[] name) { NAME.put(getNd(), this.address, name); }
public void setName(char[] name) { NAME.put(getNd(), this.address, name); }
public IString getName() { return NAME.get(getNd(), this.address); }