public static int getModifiersFrom(IAttributedFeatureInfo afi) { int iModifiers = 0; iModifiers = Modifier.setBit(iModifiers, afi.isPublic(), PUBLIC); iModifiers = Modifier.setBit(iModifiers, afi.isPrivate(), PRIVATE); iModifiers = Modifier.setBit(iModifiers, afi.isProtected(), PROTECTED); iModifiers = Modifier.setBit(iModifiers, afi.isInternal(), INTERNAL); iModifiers = Modifier.setBit(iModifiers, afi.isStatic(), STATIC); return iModifiers; }
public static String evalParameterDecription(IParameterInfo parameterData) { // replicates logic in gw.internal.gosu.parser.GosuMethodParamInfo._description if (parameterData instanceof IGosuMethodParamInfo) { IFeatureInfo featureInfo = parameterData.getContainer(); IAttributedFeatureInfo annotatedFI = (IAttributedFeatureInfo) featureInfo; List<IAnnotationInfo> annotation = annotatedFI.getAnnotationsOfType(JavaTypes.PARAM()); for (IAnnotationInfo o : annotation) { if (o != null && o.getFieldValue("FieldName").equals(parameterData.getName())) { return (String) o.getFieldValue("FieldDescription"); } } return ""; } else { return parameterData.getDescription(); } }