test_class.declarator: reference1
test_class.modifier: private
test_class.original_string: private Reference reference1;
test_class.type: Reference
test_class.var_name: reference1
test_class.declarator: reference2
test_class.modifier: private
test_class.original_string: private Reference reference2;
test_class.type: Reference
test_class.var_name: reference2
test_class.declarator: reference3
test_class.modifier: private
test_class.original_string: private Reference reference3;
test_class.type: Reference
test_class.var_name: reference3
test_class.declarator: context
test_class.modifier: private
test_class.original_string: private ReferenceContext context;
test_class.type: ReferenceContext
test_class.var_name: context
test_class.file: preon-el/src/test/java/org/codehaus/preon/el/ctx/MultiReferenceTest.java
test_class.identifier: MultiReferenceTest
test_case.body: @Test
      public void testNarrow() {
          StringBuilder builder = new StringBuilder();
          Document document = new StringBuilderDocument(builder);
          String propertyName = "pi";
          expect(reference1.narrow(String.class)).andReturn(reference1);
          expect(reference2.narrow(String.class)).andReturn(reference2);
          expect(reference1.getType()).andReturn(String.class).times(2);
          expect(reference2.getType()).andReturn(String.class).times(2);
          expect(reference1.getReferenceContext()).andReturn(context).times(2);
          expect(reference2.getReferenceContext()).andReturn(context).times(2);
          replay(reference1, reference2, context);
          MultiReference multi = new MultiReference(reference1, reference2);
          multi.narrow(String.class);
          verify(reference1, reference2, context);
      }
test_case.class_method_signature: MultiReferenceTest.testNarrow()
test_case.full_signature: @Test public void testNarrow()
test_case.identifier: testNarrow
test_case.invocations: andReturn expect narrow andReturn expect narrow times andReturn expect getType times andReturn expect getType times andReturn expect getReferenceContext times andReturn expect getReferenceContext replay narrow verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNarrow()
focal_class.declarator: REFERENCE_ARRAY_TYPE = new Reference[0]
focal_class.modifier: private static
focal_class.original_string: private static Reference[] REFERENCE_ARRAY_TYPE = new Reference[0];
focal_class.type: Reference[]
focal_class.var_name: REFERENCE_ARRAY_TYPE
focal_class.declarator: references
focal_class.modifier: private
focal_class.original_string: private Reference<E>[] references;
focal_class.type: Reference<E>[]
focal_class.var_name: references
focal_class.declarator: context
focal_class.modifier: private
focal_class.original_string: private ReferenceContext<E> context;
focal_class.type: ReferenceContext<E>
focal_class.var_name: context
focal_class.declarator: commonSuperType
focal_class.modifier: private
focal_class.original_string: private Class<?> commonSuperType;
focal_class.type: Class<?>
focal_class.var_name: commonSuperType
focal_class.file: preon-el/src/main/java/org/codehaus/preon/el/ctx/MultiReference.java
focal_class.identifier: MultiReference
focal_class.interfaces: implements Reference<E>
focal_class.class_method_signature: MultiReference.MultiReference(Reference<E>... references)
focal_class.full_signature: public  MultiReference(Reference<E>... references)
focal_class.identifier: MultiReference
focal_class.modifiers: public
focal_class.parameters: (Reference<E>... references)
focal_class.signature:  MultiReference(Reference<E>... references)
focal_class.class_method_signature: MultiReference.calculateCommonSuperType(
              Reference<E>... references)
focal_class.full_signature: private static Class<?> calculateCommonSuperType(
              Reference<E>... references)
focal_class.identifier: calculateCommonSuperType
focal_class.modifiers: private static
focal_class.parameters: (
              Reference<E>... references)
focal_class.return: Class<?>
focal_class.signature: Class<?> calculateCommonSuperType(
              Reference<E>... references)
focal_class.class_method_signature: MultiReference.getReferenceContext()
focal_class.full_signature: public ReferenceContext<E> getReferenceContext()
focal_class.identifier: getReferenceContext
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ReferenceContext<E>
focal_class.signature: ReferenceContext<E> getReferenceContext()
focal_class.class_method_signature: MultiReference.resolve(E context)
focal_class.full_signature: public Object resolve(E context)
focal_class.identifier: resolve
focal_class.modifiers: public
focal_class.parameters: (E context)
focal_class.return: Object
focal_class.signature: Object resolve(E context)
focal_class.class_method_signature: MultiReference.selectItem(String index)
focal_class.full_signature: public Reference<E> selectItem(String index)
focal_class.identifier: selectItem
focal_class.modifiers: public
focal_class.parameters: (String index)
focal_class.return: Reference<E>
focal_class.signature: Reference<E> selectItem(String index)
focal_class.class_method_signature: MultiReference.selectItem(Expression<Integer, E> index)
focal_class.full_signature: public Reference<E> selectItem(Expression<Integer, E> index)
focal_class.identifier: selectItem
focal_class.modifiers: public
focal_class.parameters: (Expression<Integer, E> index)
focal_class.return: Reference<E>
focal_class.signature: Reference<E> selectItem(Expression<Integer, E> index)
focal_class.class_method_signature: MultiReference.selectAttribute(String name)
focal_class.full_signature: public Reference<E> selectAttribute(String name)
focal_class.identifier: selectAttribute
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: Reference<E>
focal_class.signature: Reference<E> selectAttribute(String name)
focal_class.class_method_signature: MultiReference.document(Document target)
focal_class.full_signature: public void document(Document target)
focal_class.identifier: document
focal_class.modifiers: public
focal_class.parameters: (Document target)
focal_class.return: void
focal_class.signature: void document(Document target)
focal_class.class_method_signature: MultiReference.isAssignableTo(Class<?> type)
focal_class.full_signature: public boolean isAssignableTo(Class<?> type)
focal_class.identifier: isAssignableTo
focal_class.modifiers: public
focal_class.parameters: (Class<?> type)
focal_class.return: boolean
focal_class.signature: boolean isAssignableTo(Class<?> type)
focal_class.class_method_signature: MultiReference.getType()
focal_class.full_signature: public Class<?> getType()
focal_class.identifier: getType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Class<?>
focal_class.signature: Class<?> getType()
focal_class.class_method_signature: MultiReference.narrow(Class<?> type)
focal_class.full_signature: public Reference<E> narrow(Class<?> type)
focal_class.identifier: narrow
focal_class.modifiers: public
focal_class.parameters: (Class<?> type)
focal_class.return: Reference<E>
focal_class.signature: Reference<E> narrow(Class<?> type)
focal_class.class_method_signature: MultiReference.isBasedOn(ReferenceContext<E> context)
focal_class.full_signature: public boolean isBasedOn(ReferenceContext<E> context)
focal_class.identifier: isBasedOn
focal_class.modifiers: public
focal_class.parameters: (ReferenceContext<E> context)
focal_class.return: boolean
focal_class.signature: boolean isBasedOn(ReferenceContext<E> context)
focal_class.class_method_signature: MultiReference.rescope(ReferenceContext<E> eReferenceContext)
focal_class.full_signature: public Reference<E> rescope(ReferenceContext<E> eReferenceContext)
focal_class.identifier: rescope
focal_class.modifiers: public
focal_class.parameters: (ReferenceContext<E> eReferenceContext)
focal_class.return: Reference<E>
focal_class.signature: Reference<E> rescope(ReferenceContext<E> eReferenceContext)
focal_method.body: public Reference<E> narrow(Class<?> type) throws BindingException {
          List<Reference<E>> resulting = new ArrayList<Reference<E>>();
          for (Reference<E> reference :references) {
              Reference<E> result = reference.narrow(type);
              if (result != null) {
                  resulting.add(result);
              }
          }
          if (resulting.size() == 0) {
              return null;
          } else {
              return new MultiReference<E>(resulting.toArray(REFERENCE_ARRAY_TYPE));
          }
      }
focal_method.class_method_signature: MultiReference.narrow(Class<?> type)
focal_method.full_signature: public Reference<E> narrow(Class<?> type)
focal_method.identifier: narrow
focal_method.invocations: narrow add size toArray
focal_method.modifiers: public
focal_method.parameters: (Class<?> type)
focal_method.return: Reference<E>
focal_method.signature: Reference<E> narrow(Class<?> type)