if(line.toLowerCase().contains("::method"))
return convertMethodAttribute(line);
OORexxAttribute attribute = new OORexxAttribute();
String[] words = line.split(" +");
for(int i = 0 ; i < words.length ; i++){
if(words[i].toLowerCase().equals("::attribute"))
attribute.setName(words[i+1]);
else if(words[i].toLowerCase().equals("get"))
attribute.setMutator(OORexxMutator.GET);
else if(words[i].toLowerCase().equals("set"))
attribute.setMutator(OORexxMutator.SET);
else if(words[i].toLowerCase().equals("public"))
attribute.setAccessModifier(OORexxAccessModifier.PUBLIC);
else if(words[i].toLowerCase().equals("private"))
attribute.setAccessModifier(OORexxAccessModifier.PRIVATE);
else
try{
if(Arrays.asList(OORexxDirectiveOption.values()).contains(OORexxDirectiveOption.valueOf(words[i].toUpperCase())))
attribute.addOption(OORexxDirectiveOption.valueOf(words[i].toUpperCase()));
}catch(IllegalArgumentException ex){
}
}
if(attribute.hasOption(OORexxDirectiveOption.EXTERNAL))
attribute.setExternalLibrary(LibraryExtractor.extractExternalLibrary(line));
return attribute;
}