Merge pull request #287 from pierlauro/master
Protected visibility for JavaSourceLoaderImpl's internal methods and classes
This commit is contained in:
commit
883b7282f4
|
@ -165,17 +165,17 @@ public abstract class JavaSourceLoaderImpl extends ClassLoaderImpl {
|
|||
return result;
|
||||
}
|
||||
|
||||
private void addMethod(CAstEntity methodEntity, IClass owner, AbstractCFG<?, ?> cfg, SymbolTable symtab, boolean hasCatchBlock,
|
||||
protected void addMethod(CAstEntity methodEntity, IClass owner, AbstractCFG<?, ?> cfg, SymbolTable symtab, boolean hasCatchBlock,
|
||||
Map<IBasicBlock<SSAInstruction>, TypeReference[]> caughtTypes, boolean hasMonitorOp, AstLexicalInformation lexicalInfo, DebuggingInformation debugInfo) {
|
||||
declaredMethods.put(Util.methodEntityToSelector(methodEntity), new ConcreteJavaMethod(methodEntity, owner, cfg, symtab,
|
||||
hasCatchBlock, caughtTypes, hasMonitorOp, lexicalInfo, debugInfo));
|
||||
}
|
||||
|
||||
private void addMethod(CAstEntity methodEntity, IClass owner) {
|
||||
protected void addMethod(CAstEntity methodEntity, IClass owner) {
|
||||
declaredMethods.put(Util.methodEntityToSelector(methodEntity), new AbstractJavaMethod(methodEntity, owner));
|
||||
}
|
||||
|
||||
private void addField(CAstEntity fieldEntity) {
|
||||
protected void addField(CAstEntity fieldEntity) {
|
||||
declaredFields.put(Util.fieldEntityToAtom(fieldEntity), new JavaField(fieldEntity, JavaSourceLoaderImpl.this, this, JavaSourceLoaderImpl.this.getAnnotations(fieldEntity)));
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ public abstract class JavaSourceLoaderImpl extends ClassLoaderImpl {
|
|||
}
|
||||
}
|
||||
|
||||
private Collection<Annotation> getAnnotations(CAstEntity e) {
|
||||
protected Collection<Annotation> getAnnotations(CAstEntity e) {
|
||||
Collection<CAstAnnotation> annotations = e.getAnnotations();
|
||||
if (annotations == null || annotations.isEmpty()) {
|
||||
return null;
|
||||
|
@ -227,8 +227,8 @@ public abstract class JavaSourceLoaderImpl extends ClassLoaderImpl {
|
|||
*
|
||||
* @author rfuhrer
|
||||
*/
|
||||
private class JavaField extends AstField {
|
||||
private JavaField(CAstEntity fieldEntity, IClassLoader loader, IClass declaringClass, Collection<Annotation> annotations) {
|
||||
protected class JavaField extends AstField {
|
||||
protected JavaField(CAstEntity fieldEntity, IClassLoader loader, IClass declaringClass, Collection<Annotation> annotations) {
|
||||
super(FieldReference.findOrCreate(declaringClass.getReference(), Atom.findOrCreateUnicodeAtom(fieldEntity.getName()),
|
||||
TypeReference.findOrCreate(loader.getReference(), TypeName.string2TypeName(fieldEntity.getType().getName()))),
|
||||
fieldEntity.getQualifiers(), declaringClass, declaringClass.getClassHierarchy(), annotations);
|
||||
|
@ -241,7 +241,7 @@ public abstract class JavaSourceLoaderImpl extends ClassLoaderImpl {
|
|||
*
|
||||
* @author rfuhrer
|
||||
*/
|
||||
private abstract class JavaEntityMethod extends AstMethod {
|
||||
protected abstract class JavaEntityMethod extends AstMethod {
|
||||
private final TypeReference[] parameterTypes;
|
||||
|
||||
private final TypeReference[] exceptionTypes;
|
||||
|
@ -276,7 +276,7 @@ public abstract class JavaSourceLoaderImpl extends ClassLoaderImpl {
|
|||
return parameterTypes[i];
|
||||
}
|
||||
|
||||
private TypeReference[] computeParameterTypes(CAstEntity methodEntity) {
|
||||
protected TypeReference[] computeParameterTypes(CAstEntity methodEntity) {
|
||||
TypeReference[] types;
|
||||
CAstType.Function type = (Function) methodEntity.getType();
|
||||
int argCount = type.getArgumentTypes().size();
|
||||
|
@ -303,7 +303,7 @@ public abstract class JavaSourceLoaderImpl extends ClassLoaderImpl {
|
|||
return exceptionTypes;
|
||||
}
|
||||
|
||||
private TypeReference[] computeExceptionTypes(CAstEntity methodEntity) {
|
||||
protected TypeReference[] computeExceptionTypes(CAstEntity methodEntity) {
|
||||
CAstType.Function fType = (Function) methodEntity.getType();
|
||||
Collection<CAstType> exceptionTypes = fType.getExceptionTypes();
|
||||
|
||||
|
@ -329,7 +329,7 @@ public abstract class JavaSourceLoaderImpl extends ClassLoaderImpl {
|
|||
*
|
||||
* @author rfuhrer
|
||||
*/
|
||||
private class AbstractJavaMethod extends JavaEntityMethod {
|
||||
protected class AbstractJavaMethod extends JavaEntityMethod {
|
||||
public AbstractJavaMethod(CAstEntity methodEntity, IClass owner) {
|
||||
super(methodEntity, owner);
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ public abstract class JavaSourceLoaderImpl extends ClassLoaderImpl {
|
|||
((JavaClass) owner).addField(n);
|
||||
}
|
||||
|
||||
private static TypeName toWALATypeName(CAstType type) {
|
||||
protected static TypeName toWALATypeName(CAstType type) {
|
||||
return TypeName.string2TypeName(type.getName());
|
||||
}
|
||||
|
||||
|
@ -659,7 +659,7 @@ public abstract class JavaSourceLoaderImpl extends ClassLoaderImpl {
|
|||
}
|
||||
}
|
||||
|
||||
private static final InstructionFactory insts = new InstructionFactory();
|
||||
protected static final InstructionFactory insts = new InstructionFactory();
|
||||
|
||||
@Override
|
||||
public InstructionFactory getInstructionFactory() {
|
||||
|
|
Loading…
Reference in New Issue