Package org.eclipse.jdt.core.util

Examples of org.eclipse.jdt.core.util.IConstantValueAttribute


    ByteArrayInputStream bais = new ByteArrayInputStream(jco3IdocContents);
    IClassFileReader classfileReader = ToolFactory.createDefaultClassFileReader(bais, IClassFileReader.ALL);
    IFieldInfo[] fieldInfos = classfileReader.getFieldInfos();
    for (int i = 0; i < fieldInfos.length; i++) {
      if (Arrays.equals(fieldInfos[i].getName(), VERSION_NAME)) {
        IConstantValueAttribute constantValueAttribute = fieldInfos[i].getConstantValueAttribute();
        if (constantValueAttribute != null) {
          IConstantPoolEntry constantPoolEntry = constantValueAttribute.getConstantValue();
          if (constantPoolEntry.getKind() == IConstantPoolConstant.CONSTANT_String) {
            version = constantPoolEntry.getStringValue();
            if (version != null) {
              version = version.split(JCOIDOC_VERSION_STRING_DELIMITER)[0];
            }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.util.IConstantValueAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.