1 22 package org.jboss.deployers.spi.attachments; 23 24 import java.util.Map ; 25 26 34 public interface Attachments 35 { 36 41 Map <String , Object > getAttachments(); 42 43 51 Object addAttachment(String name, Object attachment); 52 53 63 <T> T addAttachment(String name, T attachment, Class <T> expectedType); 64 65 75 <T> T addAttachment(Class <T> type, T attachment); 76 77 84 Object getAttachment(String name); 85 86 95 <T> T getAttachment(String name, Class <T> expectedType); 96 97 106 <T> T getAttachment(Class <T> type); 107 108 115 boolean isAttachmentPresent(String name); 116 117 125 boolean isAttachmentPresent(String name, Class <?> expectedType); 126 127 135 boolean isAttachmentPresent(Class <?> type); 136 137 144 Object removeAttachment(String name); 145 146 155 <T> T removeAttachment(String name, Class <T> expectedType); 156 157 165 <T> T removeAttachment(Class <T> type); 166 167 172 void clear(); 173 } 174 | Popular Tags |